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 |
|
GavinD1977
Yak Posting Veteran
83 Posts |
Posted - 2006-08-08 : 05:16:26
|
| Hello all. I have a column of type varchar(40). It is within a table i copy values to (obviously from another table). The problemi have is that sometimes the values copied over are greater than 40 characters. Is there anyway I can force the copied over value to insert the first 40 characters and just discard the ramaining ones?Thanks people. |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2006-08-08 : 05:18:04
|
use left(col, 40) KH |
 |
|
|
GavinD1977
Yak Posting Veteran
83 Posts |
Posted - 2006-08-08 : 05:23:38
|
Brilliant stuff. Thanks khtan |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-08-08 : 13:30:12
|
| or substring(col,1,40)MadhivananFailing to plan is Planning to fail |
 |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
|
|
|