>Hello all, its been a while since I have had to do this, and I can't quite remember the proper steps for making this work. If I want to use &x to execute a SQL statement, but the string is too long to fit in the variable. What are the proper steps to execute the SQL statement? I thought I needed to put it into a memo field or something, but I can't seem to get it to work. Thanks for the help.
Here's another way to build a SQL string for execution:
TEXT TO lcSQL TEXTMERGE NOSHOW
SELECT MyField1, ;
MyField2, ;
MyField3, ;
FROM MyTable ;
ORDER BY MyField1, ;
INTO CURSOR MyCursor
ENDTEXT
lcSQL = CHRTRAN( lcSQL, CHR(9)+CHR(10)+CHR(13)+";", "" )
&lcSQL
This lets you build the statement as you want to without having to mess with quotes and + signs to concatenate everything together. I think it makes things much more readable. Just my 2 cents.
Cathy