I have an assignment in Access SQL on Updates, Deletes and Inserts. I need help on a few problems, I will write the problem below and explain how I need help.
Premiere has decided to no longer sell gas ranges, so they need to be removed from inventory. ALL orders for gas ranges must be removed also. However, if an order has other items on it, ONLY remove the order for the gas range. Modify the database.
So I have an Orders table, which lists OrderNumber, OrderDate, and CustomerNumber. I also have an OrderLine table, which lists OrderNumber, PartNumber, Number Ordered, and Total Price. I need to do this with one Delete statement, but not sure how to delete from two tables, especially when the query needs to delete gas ranges from orders that have other parts on them.
Another question:
All Season has just placed an order for 10 cordless drills, for a price of $115.00. Use 21624 for the order number and the current date for their order date. Modify the database.
So again, it seems like I need to insert different record types into different tables. I need to insert the order information into the Orders table (OrderNum, OrderDate) and also insert the OrderNum, PartNum, NumOrdered, and Price into the OrderLine table.
Thanks for any help, I'm really stuck here