The following statement updates my customer table code
column with a value from an updates table.
UPDATE customer
SET customer.code =
(SELECT updates.code
FROM updates
WHERE updates.code = customer.code)
The problem I have is that where there is no record in the updates table that corresponds to the customer table, I get
the customer column set to NULL. How can I avoid the null and leave the existing value in the customer table alone when there is no match between customer and updates?
Dazed and confused
(N+, MCAD)
column with a value from an updates table.
UPDATE customer
SET customer.code =
(SELECT updates.code
FROM updates
WHERE updates.code = customer.code)
The problem I have is that where there is no record in the updates table that corresponds to the customer table, I get
the customer column set to NULL. How can I avoid the null and leave the existing value in the customer table alone when there is no match between customer and updates?
Dazed and confused
(N+, MCAD)