[askdba] Re: Update

  • From: "Irfan Khan" <irfan.khan@xxxxxxxxxxxx>
  • To: <askdba@xxxxxxxxxxxxx>
  • Date: Mon, 18 Oct 2004 22:20:54 -0400

Anything co-related subquery will die. Unless u can make it do hash =
join. BUt here ur tables are wont say big, but are significant with 45k =
records. But u can still try the same.

To over come this, i can help you to write this query in another way. =
Use the sample below. It will work like a charm, trust me and u will be =

update (select t.po_line_location_id opll , n.line_location_id npo from =
temp t , temp1 n
where t.po_line_location_id  =3D n.old_loc_id)
set opll =3D npo

Irfan, Khan
Senior ERP & Database Administrator
Converge Asia Pte. Ltd.
29 International Business Park
#02-03 Acer Building Tower B
Phone :- 65 67998078
Fax :- 65 67998096

-----Original Message-----
From: VuCanDo [mailto:vuquyen@xxxxxxxxx]
Sent: Tuesday, October 19, 2004 2:28 AM
Subject: [askdba] Update

Is this the right syntax or there is a better way to update this. =20
It's taking forever to update this table and there are only 45, 000
rows in spy_panda_model_score

update spy_panda_all_scores a
set (rank_90_flat_period_1, rank_90_ref_period_1, paid_period_1) =3D=20
(select flat_90_rank, ref_90_rank, paid_total from
spy_panda_model_score m where m.prov_id =3D a.suspect_id and
m.score_period =3D '2003');



Other related posts: