DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: extracting selected text from columns

  1. #1
    Join Date
    Apr 2004
    Location
    ny,ny
    Posts
    24

    extracting selected text from columns

    table_name: text_tab
    column_name: text (varchar2)


    this in the "text_tab" table

    row1

    echnical=%5Bother%5D&reasonFreeForm=&reason=technical&switchTo=%5B%5D&cancelSave=Y&technicalFreeForm=not+on+broadband+so+downloading+is+very+slow.&otherFreeForm=


    row 2

    technical=%5Bdownload%5D&reasonFreeForm=&reason=technical&switchTo=%5Bitunes%2C+other%5D&cancelSave=N&technicalFreeForm=Hard+to+figure+out+and+i+paid+5+months+without+ever+downloading+a+song..Mad%21&otherFreeForm=


    this is what i would ike to extract from the above text:


    row1: not on broadband do downloading is very slow

    row2: Hard to figure out and paid months without ever downloading a song


    thanks
    Last edited by challsql; 02-16-2005 at 02:43 PM.

  2. #2
    Join Date
    Apr 2004
    Location
    ny,ny
    Posts
    24
    got it eventhough sloppy.


    select replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(subs tr(text,instr(text,'technicalFreeForm=',-1)+18),
    '+',' '),
    '&otherFreeForm=',' '),
    '%21',' '),
    '%27',''''),
    '%2C',' '),
    '%3B',' '),
    '%0D%0',' '),
    '%%28',' '),
    '%3F',' '),
    '%28', ' '),
    '%29', ' '),
    '%24', ' ') reason

    from text_tab
    /

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width