Information générale
Catégorie:
Codage, syntaxe et commandes
Titre:
Storing a SQL statement within a char variable
Versions des environnements
Network:
Windows 2000 Server
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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement