I am having trouble with a stored procedure running very slowly in comparison to the same code running very quickly in a separate query window. The Stored Procedure runs in 2 1/2 minutes, but the direct query runs in 1 second.
Some notes:
- I am using SQL Server 2005.
- The query is NOT using...
I added DISTINCT to a statement, and because I added DISTINCT I also had to CAST an nTEXT datatype field in the SELECT statement to nVARCHAR. I chose to use nVARCHAR(MAX) in this case, since I have read that nTEXT is being depreciated and nVARCHAR(MAX) is the recommended substitute. However...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.