Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL to create multiple lines from one record

Status
Not open for further replies.

jchewsmith

Technical User
Nov 20, 2006
161
US
I have a sales order table that hold an order with a unit sell price that I need to create multiple lines in an invoice table for a breakdown of the sell price into details of what the unit price is made up of?
Sales Order table:
Order SellPrice
123 1.00
456 2.00

Price detail Table:
Sell Price(Mail) SellPrice (Postage) SellPrice (Print)
.50 .20 .30

Need to create a table:
Order SellPrice Commentfield
123 .50 Mail
123 .20 Postage
123 .30 Print
456 2.00 No detail for this order so only create the one line
 
Is there a key in the price detail table that you can use to link up to the order? That's the only way you're going to be able to do this.

-Dell

DecisionFirst Technologies - Seven-time SAP BusinessObjects Solution Partner of the Year
 
There is a key on the item number not the sales order. Will that work?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top