jQuery in Action, 2nd edition*
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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: 590
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
internet detective
Marshal

Joined: May 26, 2003
Posts: 30076
    
149

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
 
jQuery in Action, 2nd edition
 
subject: How to insert a single order row and multiple order detail rows into order details table?
 
Similar Threads
compare csv data with table rows
Sun's feelings about stored procedures
TableModel issue in JTable
JTable Row Deletion
[eckel] on string initialization