Home » SQL & PL/SQL » SQL & PL/SQL » Joining
Joining [message #640472] Wed, 29 July 2015 02:58 Go to next message
Nasir.azeem
Messages: 40
Registered: September 2014
Location: Karachi
Member
Dear Experts!
My Code is
***************
UPDATE PAS_POLBENEFPAYMENT X
SET X.PBP_PAYEE =

(SELECT SSC.CUST_FULLNAME
FROM PAS_POLUNDERWRITER PPU, SET_CUSTOMER SSC
WHERE PPU.CUST_CODE = SSC.CUST_CODE
AND PPU.CUST_LIFE = SSC.CUST_LIFE)
*********
My Question is how can join X.PPB_PROPOSAL=PPU.PPB_PROPOSAL
And where i join this condition
Re: Joining [message #640474 is a reply to message #640472] Wed, 29 July 2015 03:00 Go to previous messageGo to next message
Nasir.azeem
Messages: 40
Registered: September 2014
Location: Karachi
Member
I HAVE PPB_PROPOSAL IN PAS_POLBENEFPAYMENT X AND PAS_POLUNDERWRITER PPU
Re: Joining [message #640475 is a reply to message #640472] Wed, 29 July 2015 03:13 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Don't you think it should better to show your table and their relation and explain what you are trying to achieve instead of saying you have spots and ask us how to remove them?

Please read OraFAQ Forum Guide and How to use [code] tags and make your code easier to read.

With any SQL or PL/SQL question, please, Post a working Test case: create table (including all constraints) and insert statements along with the result you want with these data then we will be able work with your table and data. Explain with words and sentences the rules that lead to this result.
Re: Joining [message #640497 is a reply to message #640474] Wed, 29 July 2015 09:40 Go to previous message
LKBrwn_DBA
Messages: 487
Registered: July 2003
Location: WPB, FL
Senior Member
And what's wrong with this?:
UPDATE Pas_Polbenefpayment X
   SET X.Pbp_Payee      =
          ( SELECT Ssc.Cust_Fullname
              FROM Pas_Polunderwriter Ppu, Set_Customer Ssc
             WHERE Ppu.Ppb_Proposal = X.Ppb_Proposal
               AND Ppu.Cust_Code = Ssc.Cust_Code
               AND Ppu.Cust_Life = Ssc.Cust_Life )
 WHERE --... Here you need something to limit the rows to update

Shocked
Previous Topic: Max on Sum
Next Topic: Need a query to get the ouput in an expected format
Goto Forum:
  


Current Time: Thu Mar 28 15:32:26 CDT 2024