Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to insert a single order row and multiple order detail rows into order details table?

 
Jacky Luk
Ranch Hand
Posts: 634
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The issue is accuracy. Could you show me the SQL of this query?
Order
OrderID CustomerID EmployeeID PurchaseDate PurchaseTime PurchaseDate Reason

Order Details
OrderDetailID OrderID ProductID GrossSales Quantity Discount NetSales WarrantyExpirationDate
Thanks
Jack
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34973
379
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How about you write the SQL and we provide comments on it? We like to help people learn here and giving you the whole code doesn't feel like that.

As a hint, take a look at updateBatch() so all the SQL goes in under the same transaction.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic