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.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 truncate

Author  Topic 

j0shua
Starting Member

40 Posts

Posted - 2008-11-07 : 05:16:41
Hi, Is there an sql statement to truncate a string then get only the first four characters? Thank you

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-11-07 : 05:19:07
yup. use LEFT(col,4)
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2008-11-07 : 05:19:31

select left('testing',4)


Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2008-11-07 : 05:19:52


Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-11-07 : 05:27:36
quote:
Originally posted by madhivanan



Madhivanan

Failing to plan is Planning to fail


24 secs
Go to Top of Page

j0shua
Starting Member

40 Posts

Posted - 2008-11-07 : 05:46:24
Thank you for the information :) i appreciated it :)
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-11-07 : 05:53:12
cheers :)
Go to Top of Page
   

- Advertisement -