General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
>It would never (I know, never say never) exceed 254 fields, but the macro substituted variable containing the field list does on occasion exceed 254. What I did was create an array of 10 elements. As I go to add to the string that is macro expanded, I check to see if it will exceed the 254 limit. If it does, I go to the next element in the array and start adding to it. Then in my SQL statement, I macro expand each element. The elements that don't have any value expand to '' since I initialize them that way. I just thought it was kludgy, but it seems the only way given the limitation of a len of a command executed with Macro substitution.
>
Yep... so, have you tried to build your select statment into a tring then eval it? For example... you had your lcFields and lcWhere... do this...
lcSelect = 'SELECT '+lcFields+' FROM '+lcTables+' WHERE '+lcWhere
EVAL(lcSelect)
Previous
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