I have two tables source_table and destination_table
The source table is given below
orderid orderno invoiceno amount
1 10 NULL 100
2 NULL 11 200
i need to update destination_table with columns
orderid orderno amount
1 - -
2 - -
3 - -
based on conditions , orderid of source matches with destination orderid
if source orderno value is not null then that value should be updated in the orderno column of destination , else source invoiceno should be updated in destination orderno column