select everything after specific character

  • 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.

  • This was removed by the editor as SPAM

  • stewartc-708166 (7/29/2011)


    have you tried charindex

    CHARINDEX (Transact-SQL)

    as 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.

    Jayanth Kurup[/url]

  • 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