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 |
|
chriskhan2000
Aged Yak Warrior
544 Posts |
Posted - 2005-05-23 : 15:54:14
|
| I created a SP with a temp table, but I got an error saying that it is over the limit allowable at (8060). The size I got is about 8450. If i try to shrink the field, it says that the data will be truncated. Since this field is a binary field used for text description and extremely long, I want to know if it's possible to use RTRIM to trim it down to like about 2000 in length.If so how would I go about entering the syntax?Thanks. |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2005-05-23 : 17:32:53
|
| rtrim is not really meaning ful for a binary.Use a image datatype instead maybe.But you say it's a text description so left(@s, 2000) might work. What format is the data in that you are trying to work with?==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
chriskhan2000
Aged Yak Warrior
544 Posts |
Posted - 2005-05-23 : 17:40:35
|
| Thanks for the response. The data that I'm trying to convert is in image format. Here's what I use to convert it with.CASE (UNICODE(CAST(CAST("BITS" AS VARBINARY(4000)) AS NVARCHAR(4000))) - ASCII(LEFT(CAST("BITS" AS VARBINARY(4000)), 1))) WHEN 0 THEN CAST(CAST("BITS" AS VARBINARY(8000)) AS NVARCHAR(4000)) ELSE CAST(CAST("BITS" AS VARBINARY(8000)) AS VARCHAR(8000)) END AS SPEC |
 |
|
|
chriskhan2000
Aged Yak Warrior
544 Posts |
Posted - 2005-05-25 : 17:16:33
|
| FYI:I use substring to cut down the length of the field and so everything is all good. |
 |
|
|
|
|
|