March 1, 2005 at 1:31 am
Hi,
I Want to search a given string into another string, if it is available display its position. using sql query
ex :
materialcod
sub001-001
after the hyphen only i want
March 1, 2005 at 2:46 am
Hai,
Use this
select substring('sub001-001',charindex('-','sub001-001')+1,len('sub001-001'))
If it is a column then use this
select substring(materialcod,charindex('-',materialcod)+1,len(materialcod))
Helen
--------------------------------
Are you a born again. He is Jehova Jirah unto me
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy