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!

Update With NULL

WithnoeAug 2 2012 — edited Aug 3 2012
I am trying to write an update statement that will put a null in a field if the variable input is blank.

for example
UPDATE x = var1,
             y= var2
FROM table
WHERE .....
The user types in 'S' for variable 1 and they leave variable 2 blank. How can I get it update x to 'S' and y to null?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 31 2012
Added on Aug 2 2012
10 comments
888 views