fmpros

SQL quandry...

Discussion created by fmpros on Mar 2, 2013
Latest reply on Mar 2, 2013 by fmpros

OK, I give up.... this is probably something stupid but...

 

Here's my SQL: ExecuteSQL ( "SELECT REPORTS_TIME + ' / ' + REPORTS_SITE + ' / ' + REPORTS_TITLE + ' / ' + REPORTS_PATIENT_NAMESTYLE_FML_CALC FROM REPORTS WHERE REPORTS_DATE = ? AND REPORTS_SITE IN ( ? )" ; "" ; "" ; $dateSelected ; allowedSitesList )

 

I've dissected this every which way and all vars evaluate properly and the "IN" statement is properly formatted, i.e., ( 'site a', 'site b', etc ).

I get null back with this syntax BUT if I say "NOT IN" it returns a list to me. But just the full list, I can't drop a list value out and get a change (what I would expect)... the "IN" is evaluating as if it's NULL.

 

But I KNOW the site names in the table exactly equal the values in the "IN" list. I've evaluated the ExecuteSQL as a text string with a substitute and it is formatting properly.

 

Any thoughts...

 

Thanks,

William

Outcomes