Posted by: piranha June 30, 2008
Login in to Rate this Post:
0
?
Thanks pkshr...it might work in later version and might even work in sql server..It dint work in my case...MERGE feature was introduced in 9i so i dint tried at all..maybe someday id use MERGE....thanks for tips ...... was .8i really sucks..
I really appreciate every ones help...even it could not match my solution i think it will be helpful sometime later..coz most of them might work on later versions...
SOLUTION : I used the cursor , looped and updated the table A...i hope this would work let me know if you have any other suggestions of comment on my solution.I know it takes too long.
declare
CURSOR
cur IS SELECT B.cost cost,A.item item,A.loc loc FROM table_a A, table_b BWHERE
A.ITEM = B.Item AND A.LOC = B.Location;BEGIN
FOR
C1 in curLOOP
UPDATE TABLE_A SET STDCOST = c1.Cost WHERE item = c1.item AND loc = c1.loc;END
LOOP;COMMIT;
END;