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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

JOINING THREE TABLES

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I have three tables the first is a list of products ordered, the second is a catalogue of products from the wholesaler which has Wholesale price figure for each item.The last table is the retailer catalogue which shows selling price figure.

I want to

1] For each product listed in the orders table locate the wholesale price if it exists

2] The sameas above except display the selling price for any matching records in the retail table

3] Join the above results sets together and display only a single price for each order product . If a selling price exists display it else if a wholesale price exits display this instead . If no price is found in either file display a null in that column .
 
VisitorMT

Can you give the layout of the tables?

Will the Catalogue table have the product even if there is no wholesale price? Is the same true for the Retail Table?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top