Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can't seem to perfect syntax
Message
De
08/04/2011 11:31:50
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Can't seem to perfect syntax
Versions des environnements
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01506636
Message ID:
01506636
Vues:
97
Hi. Please note that I am a VFP7 user.

Issue: I want a loop that will summarize for each salesman, then do a total for all. My issue is how to format my 'mysm' variable to insert in a sql without error.

Simplified example:
IF NOT EOF('query1')
   mysm ='salesmn' = + ALLT(query1.salesmn) + ' And'
ELSE
   mysm = ''
ENDIF
The resulting query expanded:
IF NOT EOF('query1')
   SELE * from INVOICES where salesmn = 'Randy Waldman'  And  glyear = 11
ELSE
   SELE * from INVOICES where glyear = 11
ENDIF
Thanks, Randy
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform