i am using Dynamic SQL .
print @.sql <- It will show the statment if there is an error , Now, How can
i show the statment even there is an error
EXEC (@.sql)
Thanks a lotDont understand exactly your question, but you can print it before
executing the @.Sql, so you get the information in the messages pane (QA).
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
--
"Agnes" <agnes@.dynamictech.com.hk> schrieb im Newsbeitrag
news:%23pMdy9LSFHA.1176@.TK2MSFTNGP12.phx.gbl...
>i am using Dynamic SQL .
> print @.sql <- It will show the statment if there is an error , Now, How
> can i show the statment even there is an error
> EXEC (@.sql)
> Thanks a lot
>|||Thanks Jens,
How can I print it before excuting the @.sql ?
Thanks
"Jens Smeyer" <Jens@.Remove_this_For_Contacting.sqlserver2005.de> glsD:e$pfxEMSF
HA.3444@.tk2msftngp13.phx.gbl...
> Dont understand exactly your question, but you can print it before
> executing the @.Sql, so you get the information in the messages pane (QA).
> HTH, Jens Suessmeyer.
> --
> http://www.sqlserver2005.de
> --
> "Agnes" <agnes@.dynamictech.com.hk> schrieb im Newsbeitrag
> news:%23pMdy9LSFHA.1176@.TK2MSFTNGP12.phx.gbl...
>|||Hi,
Print @.sql is good enough. Could you please post your entire part of dynamic
SQL. The error might be because of some other issues in declaration or
asssignment.
Thanks
Hari
SQL Server MVP
"Agnes" <agnes@.dynamictech.com.hk> wrote in message
news:%23$b8JcMSFHA.1236@.TK2MSFTNGP14.phx.gbl...
> Thanks Jens,
> How can I print it before excuting the @.sql ?
> Thanks
> "Jens Smeyer" <Jens@.Remove_this_For_Contacting.sqlserver2005.de>
> glsD:e$pfxEMSFHA.3444@.tk2msftngp13.phx.gbl...
>|||Print @.sql --> Messages Pane
or Select @.sql --> Result Pane
Jens Suessmeyer.
http://www.sqlserver2005.de
--
"Agnes" <agnes@.dynamictech.com.hk> schrieb im Newsbeitrag
news:%23$b8JcMSFHA.1236@.TK2MSFTNGP14.phx.gbl...
> Thanks Jens,
> How can I print it before excuting the @.sql ?
> Thanks
> "Jens Smeyer" <Jens@.Remove_this_For_Contacting.sqlserver2005.de>
> glsD:e$pfxEMSFHA.3444@.tk2msftngp13.phx.gbl...
>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment