Friday, 15 June 2012

How to alter the SQL output messages -



How to alter the SQL output messages -

i have multiple insert / select statements part of single sql info import script. when run script output

(141926 row(s) affected) (124366 row(s) affected) (4 row(s) affected) (1 row(s) affected)

but want is

(141926 row(s) affected) - customers deleted (124366 row(s) affected) - customers inserted (4 row(s) affected) - customers missing lastly name etc (1 row(s) affected)

is there anyway in sql??

i agree @yorick de wid, in don' think can customise sql output.

the closest can think of in sql server "roll own", doing like:

declare @recordsaffected int <execute sql statement here> set @recordsaffected = @@rowcount print convert(varchar,@recordsaffected) + ' <your message here>'

sql

No comments:

Post a Comment