Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Parameterized SQL PassThrough Question
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Client/server
Title:
Parameterized SQL PassThrough Question
Miscellaneous
Thread ID:
00329981
Message ID:
00329981
Views:
57
Can anyone tell me why the first SQL statement returns 17 records and the second returns none? Both SQLEXEC()'s return 1 so there are no errors in either SELECT.
? SQLEXEC(1,"SELECT *;
 FROM ZAKI.PROJ Proj;
 WHERE {fn LEFT(Proj.PROJ_ID,6)} IN ('000609','000172','001113') AND {fn LENGTH(Proj.PROJ_ID)}=10;
 ORDER BY Proj.PROJ_ID")

mcproj="'000609','000172','001113'"

? mcproj
? SQLEXEC(1,"SELECT *;
 FROM ZAKI.PROJ Proj;
 WHERE {fn LEFT(Proj.PROJ_ID,6)} IN (?mcproj) AND {fn LENGTH(Proj.PROJ_ID)}=10;
 ORDER BY Proj.PROJ_ID")
Colin Magee
Team Leader, Systems Development
Metroland Media Group Ltd.
Mississauga, Ontario, Canada

cmagee@metroland.com

Never mistake having a career with having a life.
Next
Reply
Map
View

Click here to load this message in the networking platform