>>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
Cetin,
I thought of using a comma separated list stored to a property but was hoping SQL could handle the existing code. Looks like it's the property.
Another question: Can you create a view of a remote table joined with a local cursor? If so, how? I tried creating a remote view of the SQL table and when I tried to add the local table to the view it would only show me the tables on SQLServer.
Thanx,
Colin Magee
Team Leader, Systems Development
Metroland Media Group Ltd.
Mississauga, Ontario, Canada
cmagee@metroland.comNever mistake having a career with having a life.