sql - Oracle Update Join based on a select -
Using the following selection and want to make an update, but a bit confusing of syntax is so easy in Microsoft SQL!
If the selection is down and what I want to do, then select this where anything is c.allow_to_trade = 'n' for 'y' and the base on the rest of the criteria.
Select "Trade Date", t.client, c.shortened_name, c.allow_to_trade "active", C.GCD_NUMBER from lib.trades t, lib.client_address C. Where c.allow_to_trade = 'y' group by t.client = c.client and C.GCD_NUMBER, t.client, c.shortened_name, being the maximum (trade_date) of c.allow_to_trade;
Thanks in advance
, You can try this:
update lib.client_address set allow_to_trade = 'n' ou (where lib.trades t, t.client selection client, lib.client_address c. Client = c.client and C.GCD_NUMBER, t.client, c.shortened_name, c.allow_to_trade having having Max (trade_date) & lt c.allow_to_trade = 'y' group, '01 May 2012');
Comments
Post a Comment