I have written a stored proc that selects data from this table:
and puts it another table in this manner:
A1 AA BB
A2 AA BB
B1 AAA BBB
B2 AAA BBB
In short, I wanted to concatenate data in the second column.
My question is for some reason, SQL Server is limiting the length of the string to only 256 characters, even though I have defined the local variables in the storeds proc as varchar(1000) and the table has that field defined as text.
Chances are, it is not limiting the string to 256 characters. This is probably due to the default 256 character result set width in Query Analyzer. Go through Query Analyzer's options and bump it up to a higher value.
If it's not practically useful, then it's practically useless.