COMP_BLOOMBERG_CODE = xls01.col1), COMP_AMS_DIVIDEND_FREQ=( SELECT col17 FROM xls01 WHERE INVST_COMPANY. Is there a way to do this or perhaps a better approach? June 05, 2013 - pm UTC write one bit of code to generate the other bits of code. write one procedure that will write 200 procedures.
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.
- cheapest sex dating
- find love by dating
- Top10 adult dating sites
- London ontario adult dating nude
- an error occurred while updating
I want to write SQL ( not PL/SQL ) to update transaction table from mapping table at one stroke. regards & thanks pjp update ( select old.old_account_number, new.new_account_number from old_table old, mapping_table new where old.old_account_number = new.new_account_number ) set old_account_number = new_account_number; disabling foreign keys during the operation and enabling them afterward. update ( select old.old_account_number, new.new_account_number from old_table old, mapping_table new where old.old_account_number = new.old_account_number ) set old_account_number = new_account_number; (ie in the subquery, match the old account numbers not try matching the old in the old table to the new in the mapping table) Of course if the original posting had the CREATEs/INSERTS etc, it would have a quick and east test.
I have to update a transaction table where mapping is existing with old account no and new account number.
ITEM_NO * ERROR at line 4: ORA-00904: "CLASS_TEST"."ITEM_NO": invalid identifier Any help will be appreciated. If i am updating & using non key preserved tables then exists seems to be quicker one! update account_allocation2 set (sup_hyg_acc_policy,sup_hyg_acc_add)= ( select sup_hyg_acc_policy,sup_hyg_acc_add from acc_hyg_driver where acc_hyg_driver.account_number = account_allocation2.account_number and exists ( select '1' from acc_hyg_driver where acc_hyg_driver.account_number = account_allocation2.account_number )) any ideas?? merge into account_allocation2 using acc_hyg_driver on (acc_hyg_driver.account_number = account_allocation2.account_number) when matched then update set sup_hyg_acc_policy = acc_hyg_driver.sup_hyg_acc_policy, sup_hyg_acc_add = acc_hyg_driver.sup_hyg_acc_addmerge into account_allocation2 using (select * from acc_hyg_driver where account_number in (select account_number from account_allocation2) acc_hyg_driver on (acc_hyg_driver.account_number = account_allocation2.account_number) when matched then update set sup_hyg_acc_policy = acc_hyg_driver.sup_hyg_acc_policy, sup_hyg_acc_add = acc_hyg_driver.sup_hyg_acc_add when not matched then insert (account_number) values ( null ) the "using" query only needs to use the IN if acc_hyg_driver might have account numbers that are NOT IN account_allocation2, if acc_hyp_driver only has account numbers in that set, you can just use that table. But the volumes dealt with are account_allocation has 16 million acc_hyg_driver has 6 million and the update does around 6 million records, The current merge takes more than 5 hours with other bottle necks ( includes CPU sharing) which cant be helped!
ID = @parameter Hope I succeded in making it clearer.
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.
with dbms_sql, you'll have one procedure that can process all 200 tables, it can describe what the cursor returns, it can bind to what the cursor returns and it can fetch an arbitrary row with an unknown (at compile time) set of columns. then 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. Only nc type amt2 column in table1 should be updated 2.
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.
COMP_BLOOMBERG_CODE = xls01.col1), COMP_AMS_STOCK_BETA=( SELECT col19 FROM xls01 WHERE INVST_COMPANY. Nah, in definition portion we have c0 ref cursor; c1 c0; then somewhere I need to define a variable that holds the rowtype for that unknown yet ref cursor.