Is there a limitation in the length of a query that SQL Server can handle?
I have a normal SqlCommand object and pass a very long select statement as a string.
The query seems to be fine when running against an SQL Server 2005/2008 engine but doesn’t execute against an SQL Server 2000 engine.
I don’t have any error details as I only have this information 3rd hand but my application isn’t working as expected. I could go to the trouble of installing an SQL Server 2000 instance but I was just wondering if anyone has a quick. Yes there is a 4K or 8K limit in SQL Server 2000 but not in 2005 type answer.
I’m aware that I could use stored procedures but lets assume I have a valid reason for not using them 🙂
SqlServer 2000 has a 4000 character query limit for adhoc queries.
Can you abstract this into a stored procedure?