Question : Need small help

Hi all,
    I have requirement for the below.client is posting a file with this format
    20100722-v1-IO_90000010_M0001_DESC0001_LD0001_I.txt
  I want to extract the above fille output as
  file1=M0001
  file2=DESC0001
  file3=LD0001
 
Please help me in advance
 

Answer : Need small help

If you're looking for an Oracle solution

if the above string is in column/variable "str"....

file1 = ltrim(regexp_substr(str,'_[^_]+',1,2),'_')
file2 = ltrim(regexp_substr(str,'_[^_]+',1,3),'_')
file3 = ltrim(regexp_substr(str,'_[^_]+',1,4),'_')



Random Solutions  
 
programming4us programming4us