Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Storing a SQL statement within a char variable
Message
De
05/08/2005 10:44:32
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Storing a SQL statement within a char variable
Versions des environnements
Visual FoxPro:
VFP 8
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01038883
Message ID:
01038883
Vues:
60
Depending on the options selected on the front-end, a selection criteria is build. In the end the cSelect, cWhere and cRest is combined into a variable cSQL.

-----------------
cSelect = 'SELECT pa_code,pa_pocode,SUM(lh_rnetkg) net,SUM(lh_bales) bales,SUM(ct_chg1) omchg,lh_rxdate ' + ;
'FROM bkwppacc LEFT JOIN bkwplot ON pa_code=lh_pcode LEFT join bkwpcor ON lh_recno=ct_lhrecno '
cWhere = 'WHERE BETWEEN(pa_code,"5A%","5Z%") ' + ALLTRIM(cCriteria)
cRest = 'ORDER BY 1,2,6 DESC GROUP BY 1,2,6 INTO CURSOR cntrcurs noconsole '

cSQL = cSelect + cWhere + cRest
&cSQL
-----------------

It looks like the variable cSQL cannot store the entire info. What can I use if the characters to store is greater than 254?

Irene
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform