syntax help

Database
Enthusiast

syntax help

Hi ,

I am using this:

select ultra region ,

max((case when ultra region like '%regional banking' then left(ultra region,then(ultra region)-16 else ultra region end)) custcol_32.

from lu_region

group by1.

I need to remove regional banking text from ultra region col.Its repeating in all the elements of ultra region colunm.

thanks,

3 REPLIES
Enthusiast

Re: syntax help

SEL OREPLACE ( ' regional banking of abcd' , 'regional banking', '')

--in your case

SEL OREPLACE ( ultra_region, 'regional banking' , '') FROM lu_region

You can use Oreplace to remove a substring in a string.

Enthusiast

Re: syntax help

Its not working

Enthusiast

Re: syntax help

sorry its working. above thread typo

thanks for ur help