Here is some sample data from 2 tables I have
Table 1
MailCustomer
CustomerID
12345
56768
Table 2
CustomerOrder
CustomerID MailFlag
12345
66666
I am trying to write an update query that will :
update the Customer flag to 'T' on Customer Order table If the Customer Number exists in the Mail Customer table.
update the Customer flag to 'F' on Customer Order table If the Customer Number does not exist in the Mail Customer table.
Given data above table below should look like below after query
CustomerOrder
CustomerID MailFlag
12345 T
66666 F
Was thinking of using case with inner join but not sure how
Our community of experts have been thoroughly vetted for their expertise and industry experience.
The Most Valuable Expert award recognizes technology experts who passionately share their knowledge with the community, demonstrate the core values of this platform, and go the extra mile in all aspects of their contributions. This award is based off of nominations by EE users and experts. Multiple MVEs may be awarded each year.
The Distinguished Expert awards are presented to the top veteran and rookie experts to earn the most points in the top 50 topics.