While I think I can make that work, I prefer not to make the query resident in the database. It may be a last resort solution.
Thanks, Bob
>Bob ---
>
>How about creating the query as a SQL-Server stored procedure, and then use SQLEXEC to execute that procedure?
>
>
>>If I execute a SQLPREPARE() statement that is very long, ie, over 255 characters, I cannot get it to execute. I have not been able to confirm that there is a 255 character limit on this statement (except that it is part of a VFP statement).
>>
>>Is there a trick, workaround or method to execute long SQL Server statements from SQLPREPARE()?
>>
>>Bob
Database Development Team