Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to manage a cursor based on conditions
Message
De
05/06/2005 08:09:34
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
05/06/2005 04:12:06
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Network:
Windows 2000 Server
Database:
MS SQL Server
Divers
Thread ID:
01020314
Message ID:
01020323
Vues:
21
>Hi Experts,
>
>I have a cursor based on a query on certain condition, now i want to retrieve data from
>another table based on each curosr rows value and some value from this row put in to another
>cursor. How will do this as SQL statement.

It might be more or less like this:

If the first cursor is called Cursor1, select a record in the first cursor, and then:
select * from MyTable where Field1 = Cursor1.Field1
If you want to match all the records in Cursor1, it doesn't matter which record is selected:
select * from MyTable where Field1 in (select Field1 from Cursor1)
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform