July 29, 2011 at 4:07 am
Hi
I have a string in a field from which i need to do a select.
My field contains the following ...
S72.00,W19.0,M16.9,Z86.7
How can i do a sleect only looking at this section of the string
.......W19.0,M16.9,Z86.7
The length of field coudl be anything upto 250 characters and all items in the string will always be seprated by a ,
Thanks in advance for any help.
July 29, 2011 at 4:44 am
This was removed by the editor as SPAM
July 29, 2011 at 4:48 am
stewartc-708166 (7/29/2011)
have you tried charindexas part of a substring SUBSTRING (Transact-SQL)
Charindex and substring together will get what you need.
charindex finds the position of the letter your lookingfor , (in case your looking for a string / pattern of letters use patindex) using the position from the above charindex you can have substring of the data starting from this position.
July 29, 2011 at 7:11 am
Many thanks for pointing me in the right direction.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply