Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Passing a parameter to th IN clause
Message
 
 
À
30/07/1999 15:14:29
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00243695
Message ID:
00248409
Vues:
33
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform