AnsweredAssumed Answered

Problem with SQL and finding unique record count in a found set.

Question asked by darryle on Sep 21, 2018
Latest reply on Sep 22, 2018 by beverly

For some reason I'm not grasping the right syntax in my SQL calculation. Here is what I have that is working fine as far as giving me a total count.

 

ExecuteSQL ("SELECT COUNT ( DISTINCT \"RentalData\".\"SerialNumber\" ) FROM \"RentalData\"" ; "" ; "")

 

When ever I add the WHERE statement I either get a "?" which tells me I made a boo boo or I get a return of "0" I know the syntax for WHERE is WHERE expr1 rel_operator expr2 and that field names can be used in place of the expressions.

 

Also looking through a lot of the stuff here about SQL I see samples people posted that don't show the \" around fields and tables. Is the \" not needed or just left out?

Outcomes