>I think Sergey gave you the best answer.
>
>BTW, what are you using the row counts for?
>
>-Mike
Thanks Mike,
Sergey's answer confirmed my findings. The query I presented in the example was oversimplified. There is a WHERE clause attached to it. We have several tables (each with its own structure) that we require counts of available records based on several criteria. The user selects the criteria from a VFP interface, which then creates the SQL command and executes it on the selected table. My dilemma is that "both" the table and the WHERE clause are variables. I could write a usp for each table, but that would make maintenance a bit complex. Is there a way to execute a query with a fixed table but a variable WHERE clause without EXEC(@SQLcmd)?
SELECT COUNT(*)
FROM Publishers
WHERE @myClause
Thank you,
Aristotle