• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 634
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic