Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Passing a parameter to th IN clause
Message
 
 
To
30/07/1999 15:14:29
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00243695
Message ID:
00248409
Views:
24
>Hi John,
>
>Hi finally resolved the problem by using SPT:
>
>lcHld_Cat1 = "'F', 'G', 'H'": Passed from user interface
>
>lcSQL = "Select * From DOCKET, Office_Docket, Docket_Org, Organization"
>lcSQL = lcSQL+" WHERE DOCKET.DOCKET_ID=Office_Docket.DOCKET_FK"
>lcSQL = lcSQL+" AND DOCKET.DOCKET_ID=DOCket_ORG.DOCKET_FK"
>lcSQL = lcSQL+" AND ORGANIZation.ORG_ID = DOCket_ORG.ORG_FK"
>lcSQL = lcSQL+" AND SUBSTRING(PROD_CAT_CD,1,1) IN (&lcHld_Cat1)"
>gnHandle=sqlconnect("xxxxxx", "yyyyy", "??????")
>=SQLExec(gnHandle, lcSQL, "vReports")
>

Yep, that way always worked. It's the parameterized view that doesn't unless you use a subquery. But then you have to populate a cursor or table with the values you need.

...where ... and State in (select state from some dummied_up_table)
Mark McCasland
Midlothian, TX USA
Previous
Reply
Map
View

Click here to load this message in the networking platform