substring query

  • hi experts

    i need to make a query where in one of the fields i remove the first 6 characters i.e

    code

    XXX - P12336

    JCP - P0209

    the query should remove XXX - and leave P12336.

    i tried doing the substring function but it needs 3 arguments and since i don't know the length of the string i would be returning, i'm getting stuck there.

  • try using

    right('XXX - P12336',len('XXX - P12336')-6)

    [font="Verdana"]Thanks
    Chandra Mohan[/font]

  • hi Chandu

    you are such a star... that's so much

  • Hi,

    also try this

    select replace('JCP - P0209',(left('JCP - P0209',6)),'')

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply