Showing posts with label substring using query. Show all posts
Showing posts with label substring using query. Show all posts

30 September 2011

split last string in sqlserver

    username

emp/satya
md/sai
emp/develop/suresh
clerk/surya
comp/sam


select reverse(substring(reverse(username),0,charindex('/',reverse(username)))) from tblemp