File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes How to insert a single order row and multiple order detail rows into order details table? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "How to insert a single order row and multiple order detail rows into order details table?" Watch "How to insert a single order row and multiple order detail rows into order details table?" New topic
Author

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

Jacky Luk
Ranch Hand

Joined: Aug 02, 2012
Posts: 601
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

Joined: May 26, 2003
Posts: 31079
    
163

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.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to insert a single order row and multiple order detail rows into order details table?