June 4, 2008 at 10:45 pm
Deal All,
I am using a stored Procedure that reads text from a table using textptr and read text. The Data in the table is actually a Valid DML Query. I need to execute this query while residing within the stored procedure. How can this be done? Can any body Help Me
Muhammad Asif
June 26, 2008 at 11:07 am
Put the query into a text object and look at sp_executesql and EXECUTE. However be aware there are some adminsitrative needs you will have to perform and you open yourself open to injection attacks thru this process.
June 26, 2008 at 8:22 pm
Also be aware that neither of those will handle the TEXT datatype. What you might want to look into is the undocumented sp_execresultset...
If you're using SQL Server 2005, lemme know because there's a couple of tricks that can easily be done there... 😉
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply