I'm fairly new to sql, recently took some classes and putting the knowledge to use for my work.
I've got two tables with a common id.
One table is missing some values, name and address, that are in the second table.
Right now I've got a query that lists the common id and the correct names and addresses from the second table, but I'm not sure how to get them to replace the unknown values in the first table.
I just can't seem to find an example to start off from.
Thank you for your assistance,
Chris
I've got two tables with a common id.
One table is missing some values, name and address, that are in the second table.
Right now I've got a query that lists the common id and the correct names and addresses from the second table, but I'm not sure how to get them to replace the unknown values in the first table.
Code:
select dea,
membername as Name,
bill_to_address_1 as Address1,
bill_to_address_2 as Address2,
bill_to_city as City,
bill_to_state as State,
bill_to_zip as Zip,
Plan
from gpo_memberships
where dea = any
(SELECT industry_id FROM indirect_customer where name = 'UNKNOWN')
order by plan
Thank you for your assistance,
Chris