Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Table updates not working with default values when used in batch files

2977952Jun 24 2015 — edited Jun 26 2015

Hi,

first post here so be gentle!

I've had an issue where we use Oracle to update a bunch of records using batch files.

We have a .sql file which uses a cursor to update a table with data from another table.

within the table being updated we have two default values which are working for inserts and previous records have all been updated to show the default values.

in the update within the cursor we are not actually updating the two default value columns but a load of different columns.

but I've realised the update hasn't actually been working. By adding in the two default value columns to be part of the update it now works.

so I have fixed the problem but I've no idea why this wouldn't work to start with?

also worth noting that the table has been updated fine through SQL scratchpad as I replaced one column with data from another table.

Any answers would be helpful! I have fixed it, but its bugging me why it was a problem in the first place!

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 24 2015
Added on Jun 24 2015
23 comments
3,974 views