--Say u got field1, with a prefix and suffix.
--The value is made up of ABC-*******-DDMMYYYY format,
--where the ******* can be any no. of chars.
--we want to retrieve the values between the to '-'.
select distinct substr(field1, 5, (instr(field1,'-',1,2) -1) -4)
from dual
order by 1;
--I need to thank Jen-nee for this one ( 8 )
**************************
keywords substr
**************************
No comments:
Post a Comment