Sql updating multiple columns from another table

00000 - "%s: invalid identifier"update ( select old. What if i need to update a table using data from an external table?

COMP_BLOOMBERG_CODE = xls01.col1), COMP_AMS_LST_DIVIDEND_PAID=( SELECT col16 FROM xls01 WHERE INVST_COMPANY. I see a regno (no explanation of what that is), papercode (same comment), name (i guess a student name??? I was able to define a generic cursor with ref cursor, but can't define a generic %rowtype off of that cursor. Unfortunately i cant get the tkprof as i dont have access to....you were asked to pilot a plane with a blindfold on - how well do you think you would inputs = no outputs. And why do i get an 'invalid column name' error when i run this? 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.... COMP_BLOOMBERG_CODE = xls01.col1), COMP_AMS_EPS=( SELECT col13 FROM xls01 WHERE INVST_COMPANY. anytime I don't actually test it - it doesn't work (imagine that! Dear Tom, I have to go through about 200 tables and merge into same tables but with new version. COMP_BLOOMBERG_CODE = xls01.col1), COMP_AMS_FREE_FLOAT_PCT=( SELECT SUBSTR(col12,1, INSTR(col12,'%')-1) FROM xls01 WHERE INVST_COMPANY. merge into emp using (select emp.deptno, NVL2(test1.desc1,test1.desc1, SUBSTR(ENAME,1,5)) d1, NVL2(test1.desc1,test1.desc1, SUBSTR(job,1,5)) d2 from test1 ,emp where emp.deptno=test1.deptno( )) YOUR_QUERY on (emp.deptno = your_query.deptno) when matched then update set dept_desc = d1, desc1 = d2; December 18, 2012 - pm UTC this is why I should just never ever answer anything that doesn't come with create tables, inserts (test data) and all.

Leave a Reply