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!

need help here for Oracle data base

Discussion in 'SQL PL/SQL' started by hardik.rawal, Mar 22, 2012.

  1. hardik.rawal

    hardik.rawal Guest

    I have three tables table A and table B and C

    When table C Fileld STATUS_FLAG ='Y' then both table A ,B have some field have ( A.STATUS_FLAG='Y' ,B.APRV_FLAG='Y') updated

    I want to done in a single QUERY

    please HELP here ..
     
  2. rajavu

    rajavu Forum Guru

    Messages:
    853
    Likes Received:
    53
    Trophy Points:
    610
    Location:
    @ Bangalore , India
    You have to use UPDATE statement with WHERE EXISTS Clause as in this link.

    But multiple tables cannot be updated normally with single query. You have to use seperate queries to update columns in A and B.
     
  3. kiran.marla

    kiran.marla Forum Genius

    Messages:
    430
    Likes Received:
    52
    Trophy Points:
    505
    Location:
    Khammam
    Try this and let me know whether it is working or not.

    1. Create one complex view on A and B.
    2. Create one instead of trigger on this view.
    3. Now hit your update statements to this view.