August 3, 2009 at 2:30 am
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.
August 3, 2009 at 2:51 am
try using
right('XXX - P12336',len('XXX - P12336')-6)
[font="Verdana"]Thanks
Chandra Mohan[/font]
August 3, 2009 at 3:10 am
hi Chandu
you are such a star... that's so much
August 3, 2009 at 3:24 am
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