[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details

How to capture 'print' output of stored procedure in query

Asked by quiTech in FTP Servers, SQL Query Syntax, SQL Server 2005

I'm executing a stored procedure with a t-sql query and would like to capture the 'print' output produced by the called procedure to a variable.  Is this possible?  If so, how?

Example:

create procedure calledproc as
begin
  print 'this is what we want to capture'
end

go

exec calledproc;  -- here is where I would like to capture the print output of the called procedure to a variable.

Thanks in advance!


[+][-]11/06/09 12:25 PM, ID: 25762729Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11/06/09 12:41 PM, ID: 25762852Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11/06/09 02:07 PM, ID: 25763505Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091118-EE-VQP-93 - Hierarchy / EE_QW_3_20080625