Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2012
    Posts
    2

    Unanswered: Remove few rows in a result ref cursor

    Hi,

    i have the ref cursor with result like below:

    Name id m1 m2 m3
    -----------------------------------------
    Name1 1 80 81 81
    Name2 2 75 72 80
    Name3 3 65 71 70
    Name4 6 50 55 75

    I want to remove the rows with id 2 and 6. I required the resultant ref cursor like below

    Name id m1 m2 m3
    -----------------------------------------
    Name1 1 80 81 81
    Name3 3 65 71 70

    Any help on this would be greatly appreciated.

    Thanks

  2. #2
    Join Date
    Jun 2003
    Location
    West Palm Beach, FL
    Posts
    2,713

    Thumbs down

    Quote Originally Posted by vijay0531 View Post
    Hi,

    i have the ref cursor with result like below:

    Name id m1 m2 m3
    -----------------------------------------
    Name1 1 80 81 81
    Name2 2 75 72 80
    Name3 3 65 71 70
    Name4 6 50 55 75

    I want to remove the rows with id 2 and 6. I required the resultant ref cursor like below

    Name id m1 m2 m3
    -----------------------------------------
    Name1 1 80 81 81
    Name3 3 65 71 70

    Any help on this would be greatly appreciated.

    Thanks
    If you copy and paste into a spreadsheet, you can eaisily delete the rows.
    The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb

  3. #3
    Join Date
    Jun 2004
    Location
    Liverpool, NY USA
    Posts
    2,509
    simply put

    where id not in (2,6)

    in the where portion of the ref cursor.
    Bill
    You do not need a parachute to skydive. You only need a parachute to skydive twice.

Tags for this Thread

Posting Permissions

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