1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

delete duplicate records

Discussion in 'Oracle Forms and Reports' started by SHIVA2012, Jan 28, 2012.

  1. SHIVA2012

    SHIVA2012 Active Member

    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    55
    hii all iam new to plsql programming so please try to help me with this code
    using oracle developer 6i

    EXECUTE IMMEDIATE 'DELETE FROM WGR_EMP where rowid in
    (select "rowid" from
    (select "rowid", rank_n from
    (select rank() over (partition by Empno order by rowid) rank_n, rowid as "rowid"
    from WGR_EMP))
    where rank_n > 1)';

    the code gives error as
    error 103
    encountered symbol "IMMEDIATE "

    what wrong with the above sql code in plsql
    thank you
     
  2. rajavu

    rajavu Forum Guru

    Messages:
    815
    Likes Received:
    52
    Trophy Points:
    610
    Location:
    @ Bangalore , India
    Why cant you use straight SQL instead of Execute immediate in PL/SQL ?
     
  3. SHIVA2012

    SHIVA2012 Active Member

    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    55
    I have run the above code from a parameter form after UPDATE trigger

    thank you
     
  4. kiran.marla

    kiran.marla Forum Genius

    Messages:
    403
    Likes Received:
    52
    Trophy Points:
    505
    Location:
    Khammam
    Is it Form or Report ??
     
  5. rajavu

    rajavu Forum Guru

    Messages:
    815
    Likes Received:
    52
    Trophy Points:
    610
    Location:
    @ Bangalore , India