Selecting from and updating the same table oracle danisnotonfire and amazingphil dating

The performance improvement of using the ROWID is illustrated in the following example.

The example retrieves each of the 25,000 employee records, calculates a new salary for each employee, and then updates the employees’ salary.

You can also perform more complicated updates in Oracle.

You may wish to update records in one table based on values in another table.

I'm not understanding the requirements in getting from the input to the desired output.

For example, where does this row come from: 6 2 2 test aud1 data I have my table with the following data: fnd pid my_data 1 1 test aud1 data 2 1 test aud1 data I also have the below record : fnd pid my_data 3 2 test aud2 data 4 2 test aud3 data Now I have to check based on pid , so i will be passing two pids to my procedure i.e.

The actual salary calculation is not shown in this example.

Asp Alliance Register Edit My Profile Author List Write for Us About Asp Alliance Contact Us Privacy Policy Link To Us Advertise Subscribe Free Newsletter Newsletter Archive RSS Syndication . NET 2.0 Examples ASP Tutorials Learn ASPLearn VBScript Learn JScript Learn SQLLearn XMLSoftware Resources Shopping Cart Ecommerce Charts and Dashboards Other Resources Learn Java Learn Oracle Opinion / Editorial Crystal Reports Alliance WPF Resources AJAX Resources Silverlight Resources Free Tools Cache Manager Simple CMSReviews Book Reviews Product Reviews Expert Advice Books ASP.Then I have to check if the fnd's are present in pid "2" or not If present then update my_data column only else insert the fnd and my_data column data against pid "2".So that if i select only pid =2 then I should get the below result : fnd pid my_data 3 2 test aud2 data 4 2 test aud3 data 1 2 test aud1 data 2 2 test aud1 data Only change will be 2 new records inserted from pid "1" but the pid will remain "2" not "1" . Insert any missing source pid rows into the target pid?1 and 2 as input parameter but one will be source and another will be target .Example take "1" pid as source and "2" pid is target.LAST_INSERT_ID Function Instead of using a session or local variable, you can get the same functionality using LAST_INSERT_ID function.

You must have an account to comment. Please register or login here!