Hi Kenneth,
I tried your suggestion, but it didn't help. I still had this error.
Finally, I understood, that ALLTRIM(Definition) AS Descr caused this problem.
So, I changed from ALLTRIM(Definition) TO Definition, returned back to my original code and now it works just fine.
Thanks for your help.
>Might it be easier just to do the first select into a table, then select from the others and append them into the first table one by one?
>
>This avoids problems associated with trying to debug macro commands.
>
>P.S., you can enclose your code blocks in the
and
tags to have them come out mono-spaced and indented.
Ok, I'll do it next time.
>>Hi,
>>
>>I was trying to create cursor for my report using this code:
>>
>
>> FOR lni=1 to lnTableCount
>> lcCommand=lcCommand+;
>> "SELECT '"+laTables[lni]+"' AS TABLE,"+;
>> "GROUP,FIELD_NAME,HEADER,"+;
>> "ALLTRIM(DEFINITION) AS DESCR,"+;
>> "FIELD_TYPE,FIELD_LEN,FIELD_DEC,FIELD_NULL,"+ ;
>> laTables[lni] +" AS FIELD_ORDER FROM DATADICT WHERE "+laTables[lni]+">0 "+;
>> "INTO CURSOR cur"+alltrim(str(lni))
>>
>> if lni=lnTableCount
>> lcCommand=lcCommand+" ORDER BY 1,10"
>> endif
>>
>> &lcCommand
>>
>> lcCommand="SELECT * FROM cur" +alltrim(str(lni))+" UNION "
>>
>> ENDFOR
>
>>
>>******************************
>> Here lcTableCount=11.
>> Unfortunately, on 3rd lni I have an error message "string is too long to fit". How can I resolve this?
>>
>> Thanks in advance
If it's not broken, fix it until it is.
My Blog