General information
Category:
Coding, syntax & commands
Title:
Storing a SQL statement within a char variable
Environment versions
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
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only