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 |
|
helixpoint
Constraint Violating Yak Guru
291 Posts |
Posted - 2008-12-02 : 12:22:05
|
| How do I only select the first 20 char of a field?DaveHelixpoint Web Developmenthttp://www.helixpoint.com |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-12-02 : 12:39:23
|
| [code]SELECT LEFT(field,20) FROM Table [/code] |
 |
|
|
jholovacs
Posting Yak Master
163 Posts |
Posted - 2008-12-02 : 14:56:54
|
theoretically you could also do:SELECT SUBSTRING(field, 1, 20); I don't know which would be faster, although it looks like the LEFT() function should be.___________________________Geek At Large |
 |
|
|
|
|
|