This discussion is archived
0 Replies Latest reply: Aug 27, 2013 6:56 AM by Sarma12 RSS

Issue with the update statement

Sarma12 Newbie
Currently Being Moderated


Hi all,

 

I am facing issue with the update statement ..

I have edw.dim_cdh_customer table, within which I have a column called Flag, now, I want to update the status with the value from another table shared.cdh_hz_parties, which is present in another schema.  Find below the command which I have written..   edw.dim_cdh_customer table will be having multiple records for a particular party number.. its more or less a parent child relation (wherein edw.dim_cdh_customer table is a child & shared.cdh_hz_parties is a parent, but without any foriegn & primary key constraints)

 

update edw.dim_cdh_customer set dim_cdh_customer.status=(select status from shared.cdh_hz_parties) f where f.party_number = dim_cdh_customer.party_number

 

Can you please help.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points