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 |
|
starnold
Yak Posting Veteran
83 Posts |
Posted - 2005-08-01 : 07:36:22
|
| I need to update a field where another field is longer than 6 characters?I haven't used len before and am trying to use it in a where clause? |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-08-01 : 07:47:09
|
| Is this?Update table set col=othercol where len(othercol)>6If not, post some sample data with expected resultMadhivananFailing to plan is Planning to fail |
 |
|
|
Bustaz Kool
Master Smack Fu Yak Hacker
1834 Posts |
Posted - 2005-08-01 : 11:28:06
|
| Be aware that the LEN function does not count any trailing blanks in the string/column. This can be a gotcha. DataLength can be an option around this but it returns the number of bytes; not characters. For non-Unicode this is equivalent but Unicode uses two bytes per character.HTH=================================================================The most tyrannical of governments are those which make crimes of opinions, for everyone has an inalienable right to his thoughts. -Baruch Spinoza, philosopher (1632-1677) |
 |
|
|
|
|
|