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 |
|
DMarmolejos
Yak Posting Veteran
65 Posts |
Posted - 2008-08-06 : 15:46:30
|
| update Table1set Grp = 'CADA'where ItemCode LIKE '200%'When I try to use this code, I get an error saying "String or binary data would be truncated"(ItemCodes are nvarchar and typically look like this '200-abc-1545f')any assistance is appreciated, thanks |
|
|
jimf
Master Smack Fu Yak Hacker
2875 Posts |
Posted - 2008-08-06 : 15:55:13
|
| Grp is probably a char(3) or varchar(3), 'CADA' won't fitJim |
 |
|
|
DMarmolejos
Yak Posting Veteran
65 Posts |
Posted - 2008-08-06 : 15:57:48
|
| thanks, you are righti just created Grp as a varchar without specifying anythingwould you know how i can change the lenght? |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2008-08-06 : 16:05:24
|
ALTER TABLE Table1ALTER COLUMN Grp VARCHAR(4) E 12°55'05.25"N 56°04'39.16" |
 |
|
|
DMarmolejos
Yak Posting Veteran
65 Posts |
Posted - 2008-08-06 : 16:09:30
|
| yes thanks a lot! |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
|
|
|
|