extract part of string

  • Thread starter Thread starter cshow
  • Start date Start date
C

cshow

I have the following data and I need to query extract a part of the string
and created another column with the results:

~PROGRAM=MRIRW~REPORTNAME=Housing Report
~REPORTID=BRT_CMROLL ~STYLEID=MTLCMROLL-MO~STYLEDESC=John Smith CMROLL


I need the following information( Housing Report )extracted in its own
column


Thanks
 
I have the following data and I need to query extract a part of the string
and created another column with the results:

~PROGRAM=MRIRW~REPORTNAME=Housing Report
~REPORTID=BRT_CMROLL ~STYLEID=MTLCMROLL-MO~STYLEDESC=John Smith CMROLL


I need the following information( Housing Report )extracted in its own
column


Thanks

ow...

Assuming that the text you want extracted is between "REPORTNAME=" and
the next New Line carriage-return line-feed pair:

Mid(strData, InStr(strData, "REPORTNAME=") + 12, InStr(InStr(strData,
"REPORTNAME=") + 12, strData, Chr(13) & Chr(10)) - 2)
 
Back
Top