Remove the semi-colons from your TEXT...ENDTEXT code.
>In the following code, the sql statement keeps getting chopped before the end. I have tried everything I can think of, iincluding stringing it all together and removing the aliases. It sill is to long. Can anybody offer any suggestions on getting this sql statement into the cursor adapter so that it will fill the cursor.
>
>I am also using Mark McCasland's cabuilder program. It is a wonderful tool. Thanks Mark.
>
>
>
>******************************************
>**--GetSQL Method
>LOCAL lcText
>
>TEXT TO lcText NOSHOW PRETEXT 7
> SELECT DISTINCT st.abbr, st.name, ea.state_id, st.default ;
> FROM table1 t1;
> LEFT JOIN table2 t2 ON t2.record_id = t1.record_id ;
> LEFT JOIN table3 t3 ON t3.record_id = t2.record_id ;
> LEFT JOIN table4 t4 ON t4.record_id = t3.record_id ;
> LEFT JOIN states st ON st.record_id = t4.state_id
>ENDTEXT
>RETURN ALLTRIM(lcText)
>
>
Mark McCasland
Midlothian, TX USA