I have a simple table of client statuses starting at CS1 going upto CS60 odd. If I run the following statement it returns every entry beginning CS1 (CS1, CS11 to CS19).
If I use a conventional WHERE OR statement naming all values then it works as expected returning 4 values.
I have tried using the SET EXACT ON but that makes no difference. I've tried ALLTRIMing the fields and that makes no difference either. I only need 4 items so I can use the WHERE OR here but I wondered if anyone knows the IN command of SQL works in this way.
I am using native VFP 8 SQL on VFP 8 tables.
Mark Davies
Warwickshire County Council
Code:
SELECT clientstat, statusdesc ;
from clntstat ;
WHERE clientstat in ('CS1', 'CS14', 'CS40', 'CS41' ) ;
INTO CURSOR combosource
If I use a conventional WHERE OR statement naming all values then it works as expected returning 4 values.
Code:
SELECT clientstat, statusdesc ;
from clntstat ;
WHERE clientstat == 'CS1' OR clientstat == 'CS14' OR clientstat == 'CS40' OR clientstat == 'CS41' ;
INTO CURSOR combosource
I have tried using the SET EXACT ON but that makes no difference. I've tried ALLTRIMing the fields and that makes no difference either. I only need 4 items so I can use the WHERE OR here but I wondered if anyone knows the IN command of SQL works in this way.
I am using native VFP 8 SQL on VFP 8 tables.
Mark Davies
Warwickshire County Council