Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

a transact-sql query to pl/sql

Status
Not open for further replies.

markyo

Programmer
Aug 27, 2002
3
IT
Someone could help me to translate this query that works in correct way under microsoft sql, but I cannnot execute it in Oracle?

update ao set
A3O_C_AUS=t.A3O_C_AUS,
A3O_C_ERST=t.A3O_C_ERST,
A3O_C_BEM=t.A3O_C_BEM
from AUSGAB3_ORG ao
join AUSGAB3_ORG_temp t on ((ao.A3O_D_TYP=t.A3O_D_TYP and ao.A3O_D_NR=t.A3O_D_NR and ao.A3O_D_LANG=t.A3O_D_LANG and ao.A3O_D_ZEILE=t.A3O_D_ZEILE));

In practice I must to update the rows identified from the rows contained in a temporary table.
Unfortunately there isn't a single column with unique index; the uniqueness is due from the four column in the on clause...

Thank you in advance!
 
update AUSGAB3_ORG ao
set( A3O_C_AUS, A3O_C_ERST, A3O_C_BEM) =
(select
t.A3O_C_AUS, t.A3O_C_ERST t.A3O_C_BEM
from AUSGAB3_ORG_temp t
where ao.A3O_D_TYP=t.A3O_D_TYP
and ao.A3O_D_NR=t.A3O_D_NR
and ao.A3O_D_LANG=t.A3O_D_LANG
and ao.A3O_D_ZEILE=t.A3O_D_ZEILE
);





Thomas V. Flaherty Jr.
Birch Hill Technology Group, Inc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top