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
 how to substr this?

Author  Topic 

nuruddean
Starting Member

11 Posts

Posted - 2010-09-07 : 00:54:07
i have this word JUSA.VK.6.P1
i just want the no 6 only how i want to get it?

My Name is Nuruddin

nathans
Aged Yak Warrior

938 Posts

Posted - 2010-09-07 : 01:10:02
If you are only dealing with <= 4 parts then you can use:
declare @yak varchar(20)
set @yak='JUSA.VK.6.P1'

select parsename(@yak, 2)
Go to Top of Page
   

- Advertisement -