Discussion:
SSE 2008 / 2012: Script Results
(too old to reply)
Gene Wirchenko
2012-04-17 21:51:20 UTC
Permalink
Dear SQLers:

I have a script that sets up a simple database. I have various
messages in it to indicate what should be happening.

On inserts that will fail, I put a print statement before.
print 'PKPri is a duplicate:'
insert ...
That shows up the errors nicely.

On selects, it is not so easy. I want to see a message that the
table should have so many rows, but it does not all show:
select 'This message is about the table and is too long per
some limit:'
select * from Primus
I would like to see the full message without having to resize it
manually. Is there any way to do this with *grid* output?

I would like the answer for SSE 2008 and for 2012.

I have tried casting, but that does nothing. (I would think that
select <expr> [,<expr>] should be an exception and would be displayed
in full. After all, it is always one row.)

Sincerely,

Gene Wirchenko
Erland Sommarskog
2012-04-18 07:31:31 UTC
Permalink
Post by Gene Wirchenko
On selects, it is not so easy. I want to see a message that the
select 'This message is about the table and is too long per
some limit:'
select * from Primus
I would like to see the full message without having to resize it
manually. Is there any way to do this with *grid* output?
I would like the answer for SSE 2008 and for 2012.
There is not much you can do about it. There is a reason why I stick to
the old Query Analyzer from SQL 2000.

Note however that you can double-click on the edge of the grid header
to resize so that every visible fits - save for the column header.
--
Erland Sommarskog, SQL Server MVP, ***@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
Loading...