Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to manage a cursor based on conditions
Message
 
 
À
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:
01020332
Vues:
16
Abdulla,

>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.

You can use a JOIN to pull additional columns from the other table(s). For example this selects columns from 3 related tables using 2 JOINs:
select customer.*, invoice.InvoiceNo, order.ItemDescript, order.Amount ;
   from customer ;
   inner join invoice ;
      on customer.CustomerNo = invoice.CustomerNo ;
   inner join order ;
      on invoice.InvoiceNo = order.InvoiceNo ;
   into cursor customerItems ;
   where customer.Country = "USA"
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform