Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Use VFP cursor IN SPT query?
Message
De
12/09/2002 15:46:36
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00699905
Message ID:
00699911
Vues:
20
>Is there a way to select records from a SQL Server table based upon values in a VFP cursor using SPT? In concept its simply....
>SELECT * from SQLTable Where PK IN (Select PK from VFPCursor)
>but since SQL doesn't know the contents of the VFP cursor, it's obvious why this won't work. Is some other way -- other than Scan the cursor and retrieve them one at a time...

you could do a scan through your VFPcursor, generating a comma-delimited string, containing your PKs, and the you could use the SPT like this:
SELECT * from SQLTable Where PK IN ('aa','bb','cc','dd')
HTH
Claudio Lassala
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform