views:

29

answers:

2

Hi All,

I have SQL Server 2000 and I have a stored procedure that has @output as varchar(8000) and I have a loop that keeps concatenate the result into @output and at the end I made select @output

My problem is the output length is truncated to the first 256 characters only!!! Other characters (output) is missing.

I tried to use TEXT instead of varchar but I got an error

The text, ntext, and image data types are invalid for local variables.

Any idea is highly appreciated

Thanks in advance

+1  A: 

I bet you are using query analyzer for this. If you do, most probably this is a setting problem. In query analyzer options, try to find the setting for maximum number of characters displayed in each column, set it higher, for example to 8000.

endy_c
In fact i tried query analyzer after getting the same result of executing the SP using PHP code!!
Alaa