flaviooooo
Programmer
Hi,
I have 2 tables: tOrders and tOrders_import. Everyday we import orders from an external program, into the tOrders_import. This table is emptied daily. Then new orders will be added into tOrders. Also orders where the remark has changed need to be added.
To do this I link the key-field to each other. If the key isn't in tOrders, it will be added.
Then I compare the remark field in the 2 tables, and if it doesn't match the new remark is entered.
But this doesn't seem to work if the first remark is blank, and the second one isn't.
In the query this looks like:
import tOrders inner join tOrders_import on (tOrders.key = tOrders_import.key) set tOrders.remark = tOrders_import.remark where tOrders.remark <> tOrders_import.remark
How can I do this correctly?
I have 2 tables: tOrders and tOrders_import. Everyday we import orders from an external program, into the tOrders_import. This table is emptied daily. Then new orders will be added into tOrders. Also orders where the remark has changed need to be added.
To do this I link the key-field to each other. If the key isn't in tOrders, it will be added.
Then I compare the remark field in the 2 tables, and if it doesn't match the new remark is entered.
But this doesn't seem to work if the first remark is blank, and the second one isn't.
In the query this looks like:
import tOrders inner join tOrders_import on (tOrders.key = tOrders_import.key) set tOrders.remark = tOrders_import.remark where tOrders.remark <> tOrders_import.remark
How can I do this correctly?