I have 2 tables with the following fields.
OrderInfo
PO Number
Status
CustomerInfo
Purchase Order Number
Customer Name
Customer Phone
Order Status
This is what I am trying to do:
get the Status for a the PO Numbers from the first table and update the Order Status field for those same PO Numbers in the second table.
This is how I am doing it currently:
I created a select query and saved it as ExistingPO. This is what ExistingPO looks like.
and then I created another query which makes use of this first select query. The second query looks like this
But I was wondering is there was a way to combine the first query and the second query into one query?
OrderInfo
PO Number
Status
CustomerInfo
Purchase Order Number
Customer Name
Customer Phone
Order Status
This is what I am trying to do:
get the Status for a the PO Numbers from the first table and update the Order Status field for those same PO Numbers in the second table.
This is how I am doing it currently:
I created a select query and saved it as ExistingPO. This is what ExistingPO looks like.
VB.NET:
SELECT OrderInfo.*
FROM CustomerInfo INNER JOIN OrderInfo ON CustomerInfo.[Purchase Order Number] = OrderInfo.[PO Number];
VB.NET:
UPDATE CustomerInfo INNER JOIN ExistingPO ON CustomerInfo.[Purchase Order Number] = ExistingPO.[PO Number] SET CustomerInfo.[Order Status] = ExistingPO.Status;