I am trying to fetch some data from a column and run the substr operation on it, then decode the substr into something else. I tried something along these lines, but it did not work:
select decode(substr(column_name,1,10) , 'DUCK') from tablex where column_name = 'EDGEWATER POND';
This probably should be easy but it just isn't coming to me. I want to select a string (substring rather), and change it's value everywhere in this column. In this case I am trying to find all values called 'EDGEWATER POND', then decode the 'EDGEWATER' portion and change the value to 'DUCK'. I know the select isn't going to update anything, but I wanted to see if I could get the syntax working correctly before attempting to do the update.
Click Here to Expand Forum to Full Width