Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2009
    Posts
    8

    Unanswered: plsql regexp and for loop

    Hi,

    I am a newbie to oracle and plsql. I have a table with column called category_forms and category

    category_forms
    ABC_1
    ABC_2
    ABC_3
    XYZ_5
    XYZ_6
    JPG_8
    JPG_1

    I need to parse the part before '_' from the category_forms using regexp and I need to insert into category column in the same table like below.

    category
    ABC
    ABC
    ABC
    XYZ
    XYZ
    JPG
    JPG

    May I know how I can do this in plsql?

    Thanks,
    Shijumic

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    >May I know how I can do this in plsql?
    No need for PL/SQL.
    It can be done using plain SQL along with INSTR & SUBSTR functions
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  3. #3
    Join Date
    Nov 2009
    Posts
    8
    Quote Originally Posted by anacedent View Post
    >May I know how I can do this in plsql?
    No need for PL/SQL.
    It can be done using plain SQL along with INSTR & SUBSTR functions
    Thanks for the right functions!

Posting Permissions

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