Hi,
I want to save Message printed in the Message tab when we run the TSQL.
I need something like
set @a= Messages printed below
Regards
Technology Tips and News
Hi,
I want to save Message printed in the Message tab when we run the TSQL.
I need something like
set @a= Messages printed below
Regards
When you execute the T-SQL script (-i option) with SQLCMD, you can capture results & messages mixed in an output file (-o option).
SQLCMD tutorial: https://technet.microsoft.com/en-US/library/ms170207(v=SQL.105).aspx
@@ROWCOUNT
>I want to save a message to a variable irrespective of the TSQL Command.
I am afraid that is not possible.