In my tblOrderDetails table I have the following fields: OrderID,
OrderItemID and DeliveryDate.
I need to loop trough each row in an excel spreadsheet and find OrderID and
OrderItemID combinations that match rows in tblOrderDetails then update the
DeliveryDate field in tblOrderDetails based on the DeliveryDate held in the
corresponding row of the excel spreadsheet.
What is the most efficient way of doing this?
Assume the spreadsheet looks like this:
Column "A" = OrderID
Column "B" = OrderItemID
Column "C" = DeliverDate
Would it be something like (written in layman's terms):
For each row in tblOrderDetails _
get the value of the OrderID an OrderItemID
Then Loop through the Excel spreadsheet _
and check column "A" for an OrderID match
If an OrderID match is found _
check for a match of the OrderItemID
If both values match then
loop through the tblOrderDetails table and update the _
DeliveryDate field for that item
Is that the most efficient way of doing this. I'll worry about the actual
code later, I just want to know if I have got this bit right.
Thanks
Paul