>Using VFP data I have a SQL statment like the following:
>
>
>SELECT * FROM Buildings WHERE ASCAN(aProjects,ProjID)#0 INTO CURSOR cBuildings
>
>
>How would I do something logically similar for a parameratized remote view of SQLServer data?
Colin,
There could be another cursor instead of array that's inner joined. Or you could build a comma separated list of projids and use "in" :
SELECT * FROM Buildings WHERE ProjID in (&cCommaSepValue) INTO CURSOR cBuildings
SELECT * FROM Buildings WHERE ProjID in ('ID1', 'ID2') INTO CURSOR cBuildings
SELECT * FROM Buildings WHERE ProjID in (1023, 198) INTO CURSOR cBuildings
SQL server also allows things like this :
SELECT * FROM Buildings WHERE ProjID in (1023, 198, NULL) INTO CURSOR cBuildings
which correspond to :
where ProjID in (1023, 198) or is null
Cetin