Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2002-01-08 : 10:15:15
|
| TJ writes "I'm having problems trying to select varchar value greater than 255 characters. The select statement truncates the resultset. The original query is part of a stored procedure where a cursor is used to concate several strings, however the same problem occurs is the the example below (The last line 'Nr 5' is not returned in the resultset).Query:DECLARE @TEMP AS VARCHAR(1000)SET @TEMP = 'A VEEEEERY LOONG STRING XXX VIOLIN I SODERTALJE LGH NR 1 A VEEEEERY LOONG STRING XXX VIOLIN I SODERTALJE LGH NR 2 A VEEEEERY LOONG STRING XXX VIOLIN I SODERTALJE LGH NR 3 A VEEEEERY LOONG STRING XXX VIOLIN I SODERTALJE LGH NR 4 A VEEEEERY LOONG STRING XXX VIOLIN I SODERTALJE LGH NR 5' SELECT LEN(@TEMP) as lengthSELECT @TEMP as string Resultset: length ----------- 334string A VEEEEERY LOONG STRING XXX VIOLIN I SODERTALJE LGH NR 1 A VEEEEERY LOONG STRING XXX VIOLIN I SODERTALJE LGH NR 2 A VEEEEERY LOONG STRING XXX VIOLIN I SODERTALJE LGH NR 3 A VEEEEERY LOONG STRING XXX VIOLIN I SODERTALJE LGH NR 4 I just don't get it !!any help on the subject will be appreciated TJ" |
|
|
smccreadie
Aged Yak Warrior
505 Posts |
Posted - 2002-01-08 : 10:26:54
|
| It sounds like it might just be your display settings in Query Analyzer. (I'm assuming that's what you're using). Under the Tools -> Options menu there's a place to set the max length of the output. Check this first. |
 |
|
|
|
|
|