>I am trying to create a SQL string. Testing it in command window. Does not seem to take more then 254 chars.
"Cut" your SQL statement into pieces <255 character length.
You can make something like the following:
lc_what1="field1, field2, field3,"
...
lc_what5="field13, field14, field15"
lc_what=lc_what1+lc_what2+...
lc_where1="field1>1 and field2=75 "
...
lc_where=lc_where1+....
* etc
select &lc_what from &lc_from where &lc_where && and so on
or you can construct entire statement:
lc_SQLStatement="select "+lc_what+" from "+lc_from+...
&lc_SQLStatement
I guess the second is more suitable.
Resume: only single command must have length<255, not the string or SQL statement.