Updating one column table another column

Rated 4.54/5 based on 731 customer reviews

If you are at the conference, drop into the Groundbreaker area and say Hello. etc I have a mapping table where "ALL" old account number and new account numbers are present.

Check out all our database development sessions at OOW19 Thanks for the question, Parag Jayant Patankar. I have to update a transaction table where mapping is existing with old account no and new account number.

It will be vastly faster and more understandable.i have two tables names DETAILS and STATUS DETALIS contains eid,ename,sal and STATUS contains eid,sal,updationdate. Only nc type amt2 column in table1 should be updated 2.

You have 200 over them in the dictionary, generate code for run said code Tony Fernandez, if you are merging data into another table, don't use a cursor at all - If at all possible, query user_tab_columns to build a native dynamic MERGE statement to do the data move. :) Hi Tom, There are 2 tables Table1 type cpty amt1 amt2 c a 10 0 c a 20 0 nc a 30 0 nc a 40 0 c b 50 0 c b 60 0 nc b 70 0 nc b 80 0 Table2 amt A cpty 100 a 115 a 120 a 125 b 130 b 140 b Trying to write an single update statement that will do the following 1.

create table types 2 (type varchar2(1), 3 description varchar2(50), 4 factor number(4)); ************************************************************************ Insert table: insert into types values ('A','Monthly','12') / insert into types values ('B','HOURLY','1796') / insert into types values ('G','Daily','224') / insert into types values ('H','Per Visit','') / insert into types values ('I','Per session','') / ******************************************************************** insert into class_test values ('0001','3,281.18','4,177.64') / insert into class_test values ('0002','3,779.27','4,820.00') / insert into class_test values ('0003','4,779.27','5,820.00') / insert into class_test values ('0004','5,779.27','6,820.00') / insert into class_test values ('0005','7,311.45,'10,402.64') / insert into class_test values ('0005','','20.83') / insert into class_test values ('0006','','14,528.60') / insert into class_test values ('0007','5,001.82','5,727.91') / ****************************************************************** insert into jobs values ('0001','CSI','A','','50131.68') / insert into jobs values ('0002','TTI','A','','200') / insert into jobs values ('0003','SSP','A','','') / insert into jobs values ('0004','CCC','A','','') / insert into jobs values ('0006','CIO','A','','') / insert into jobs values ('0007','CIO','A','','') / It should be update rows in JOBS table where rate_type = 'A', and ITEM_NO of JOBS table should be match with ITEM_NO of class_test table. Name Marital Status Mobile Phone Email I want to update table A (Name and Marital Status) using table B data, considering that ID matches in both tables, and using a designated ID (the use of Id may be optional, but for sake of simplicity lets assume we only want to update 1 row, but multiple columns at same time) Update table A set table A. Interestingly the Update that is suggested by you takes 12 hours and Update using the PL/SQL cursor style takes 8 hrs consistently on the live environment! thanks in advance June 04, 2008 - pm UTC create table has to be followed by indexing, grants, constraints and everything else - have you accounted for THAT....

I want to update the school_code column in the student table with the school_id column in the school code table based on school code and year.

UPDATE SALES_DATA_FAMILY_2007 SET POG_ID= (SELECT POG_HIERARCHY. POG_ID FROM POG_HIERARCHY WHERE SALES_DATA_FAMILY_2007.

POG_ID FROM POG_HIERARCHY WHERE SALES_DATA_FAMILY_2007. If there's more than one row in POD_HIERARCHY, then you need to determine which row from POD_HIERARCHY you wish to use the value from.

FAMILY_ID) ; This will work if and only if there's at most one corresponding row in POD_HIERARCHY for a given FAMILY.

Leave a Reply