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
 sql query

Author  Topic 

jcb267
Constraint Violating Yak Guru

291 Posts

Posted - 2010-10-15 : 10:57:42
Hi -

I have a field in a table that is formatted as a varchar. However, I do not need the whole field. I only need the 3rd and fourth characters of this field. Can anyone help me to cull that out?

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2010-10-15 : 11:03:43
select
right(left(YourColumnName,4),2)
from table


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

jcb267
Constraint Violating Yak Guru

291 Posts

Posted - 2010-10-15 : 11:08:50
Thanks!
Go to Top of Page

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2010-10-15 : 11:14:56
welcome


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

javabuddy
Starting Member

4 Posts

Posted - 2010-10-16 : 05:52:08
Thanks I am also looking for same solution.

http://javarevisited.blogspot.com/
Go to Top of Page
   

- Advertisement -