Run both instances of the queries again with a SQL Profiler trace enabled. Compare the Reads. They should be similar. If not, something interesting is going on.
Also, take the captured text from the VFP query and run that in the QA.
I wonder if the result set is being limited by VFP?.
-Mike
>Hi all
>I have a pretty long SQL command (5588 chars). I wrote it in the SQL Query Analyzer. It returns 3361 records. This number has been confirmed to be the correct number of records. I pass the query string to SQL Server via SQLEXEC from a little VFP program. I get back 1148 records.
>
>I checked with the SQL Profiler. The command is exactly the same.
>
>The timeframe is only 4 seconds, so I don't think it's timing out.
>
>Anyone seen anything like this?
>
>Thanks