Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to pass a local cursors value for WHERE in SQL Pass
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 6 SP5
Divers
Thread ID:
01074566
Message ID:
01074841
Vues:
14
No correct :-). Your next step is right.

MartinJ


>Hi Martin
>
>Thanks for your response.
>
>>- or create temporaly table and upload records from local cursor to temporaly table
>
>Wow. Thanks a lot for the SQL Prepare code, it is a pity one one value can be handled in SQL Pass Thru. I have changed you code as below, please correct me if my understanding is wrong.
>
>>
>>* for MS SQL
>>?SQLEXEC(handle,"create table #temptab ( id int)")
>>?SQLPREPARE(handle,"INSERT INTO #temptab (id) values (?locacursor.id)")
>>SELE localcursor
>>SCAN ALL
>>     ?SQLEXEC(handle)
>>ENDSCAN
>>
>
>
>* for MS SQL
>?SQLEXEC(handle,"create table #temptab ( id int)")
>SELE localcursor
>SCAN ALL
>   ?SQLPREPARE(handle,"INSERT INTO #temptab (id) values (?locacursor.id)")
>ENDSCAN
>?SQLEXEC(handle)
>
>*** my query has to be something as follows
>?SQLEXEC(handle,"SELECT * FROM mytable WHERE iID IN (SELECT id FROM #temptab)")
>
"Navision is evil that needs to be erazed... to the ground"

Jabber: gorila@dione.zcu.cz
Jabber? Jabbim
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform