Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


SQL 2008 query result message tab display limit


SQL 2008 query result message tab display limit

Author
Message
mpsathiskumar
mpsathiskumar
Grasshopper
Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)

Group: General Forum Members
Points: 10 Visits: 29
Hi All,

I need to print the message more than 8000 characters. But sql server 2008 can't support more than 8000 characters. It's allowing and display only 8000 characters alone.

Can you please anyone tell me how to change this limitations?

Sample query:
Print(REPLICATE('1',8005))

This query returns only 8000 single ones like (11111...), but it should be display 8005 single ones.

Thanks & Regards,
Sathiskumar.P
Oliiii
Oliiii
SSC Veteran
SSC Veteran (212 reputation)SSC Veteran (212 reputation)SSC Veteran (212 reputation)SSC Veteran (212 reputation)SSC Veteran (212 reputation)SSC Veteran (212 reputation)SSC Veteran (212 reputation)SSC Veteran (212 reputation)

Group: General Forum Members
Points: 212 Visits: 777
The replicate command truncate to 8000 characters if you are not using varchar(max) or nvarchar(max).

If you use varchar(max) it works fine though:
select len(replicate(convert(varchar(max),1),8005))


Output: 8005
mpsathiskumar
mpsathiskumar
Grasshopper
Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)

Group: General Forum Members
Points: 10 Visits: 29
No, I want to display 8005 single ones (111111111111.....) in query result message tab and I have not problem for display the 8005 count.

Sample query:
Print(REPLICATE('1',8005))

This query returns only 8000 single ones in the query result message tab like (11111...), but it should be display 8005 single ones in that message tab not count.

Thanks & Regards,
Sathiskumar.P
steveb.
steveb.
SSCrazy
SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)

Group: General Forum Members
Points: 2848 Visits: 7195

This query returns only 8000 single ones in the query result message tab like (11111...), but it should be display 8005 single ones in that message tab not count.



You wont be able to display more than 8000 characters with PRINT no matter how much you want to

read the PRINT specs here , max is 8000 non unicode chars
http://msdn.microsoft.com/en-us/library/ms176047.aspx

Also this is a strange request, why would you want to do this?
winash
winash
Ten Centuries
Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)

Group: General Forum Members
Points: 1424 Visits: 1883
You can use this procedure http://www.sqlservercentral.com/scripts/Print/63240/ to print out your data in chunks of 8000...I've used it in the past to debug dynamic SQL statements that way exceed 8000 characters and which fail at some obscure point(yep - that was fun)


DECLARE @Max varchar(max);
SET @Max = REPLICATE('X',8000);
SET @Max = @Max+'----This will not show up in PRINT';
PRINT @Max
PRINT CHAR(13)+CHAR(13)
PRINT REPLICATE('*',30)
EXEC dbo.LongPrint @Max





Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search