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
 getting the second characters up to last character

Author  Topic 

shemayb
Posting Yak Master

159 Posts

Posted - 2009-05-30 : 02:50:52
Hi.

I know this is very simple but i need some help..

how do i get the other characters in my string?
For example i have ABCDE, how can i get the BCDE?

Thanks.

Funnyfrog

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-05-30 : 02:53:35
[code]SELECT SUBSTRING(YourString,2,LEN(YourString)) FROM YourTable[/code]
Go to Top of Page

Dev@nlkss

134 Posts

Posted - 2009-05-30 : 02:58:35
also u can use
SELECT RIGHT('String',LEN('String')-1)

$atya.

Love All Serve All.
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2009-05-30 : 03:11:14

SELECT stuff('ABCDE',1,1,'')


Madhivanan

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

shemayb
Posting Yak Master

159 Posts

Posted - 2009-05-30 : 04:51:53
thanks.

Funnyfrog
Go to Top of Page
   

- Advertisement -