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!

Two Issues in One Questions / Please help!

Status
Not open for further replies.

TJVFree

Technical User
Nov 22, 2010
236
US
Ok, I have a couple of quirky things going on with my database.

The first is my Rank formula.
For some reason I have to have two Rank fields in order for at lest one to be correct.

**I have attached the sample database if you want to view that also**

The second one is when I’m trying to make a master join query from all my tables.

This one I’ve been having trouble with all day!
I’ve tried different joins, different queries, PLEASE HELP!

In Plain English is would sound like this:

From Wholesale query, show all records and take fields
OMNI_Number,
branch,branch_name,
Wholesale_Rank>,
Wholesale_Star_Rating

Then from Table query, show only the records the are in the Table query and fields blank that done have data for that omni number

The same for the other two tables

What I’m hoping to get for my final outcome
OMNI_Number,
branch,
branch_name,
Wholesale_Rank>,
CUSB_Rank>,
Purchase_Rank1,
Table_Rank>,
Wholesale_Star_Rating,
CUSB_Star_Rating,
Purchase_Star_Rating,
Table_Star_Rating,

[sql] SELECT Wholesale_Rank_qry_2.OMNI_Number, Wholesale_Rank_qry_2.branch, Wholesale_Rank_qry_2.branch_name, Wholesale_Rank_qry_2.[Wholesale_Rank>], CUSB_Rank_qry_2.[CUSB_Rank>], Purchase_Rank_qry_2.Purchase_Rank1, Table_Rank_qry_2.[Table_Rank>], Wholesale_Rank_qry_2.Wholesale_Star_Rating, CUSB_Rank_qry_2.CUSB_Star_Rating, Purchase_Rank_qry_2.Purchase_Star_Rating, Table_Rank_qry_2.Table_Star_Rating
FROM ((Wholesale_Rank_qry_2 LEFT JOIN CUSB_Rank_qry_2 ON Wholesale_Rank_qry_2.OMNI_Number = CUSB_Rank_qry_2.OMNI_Number) LEFT JOIN Purchase_Rank_qry_2 ON Wholesale_Rank_qry_2.OMNI_Number = Purchase_Rank_qry_2.OMNI_Number) RIGHT JOIN Table_Rank_qry_2 ON Wholesale_Rank_qry_2.OMNI_Number = Table_Rank_qry_2.OMNI_Number;[/sql]

Thanks for taking the time to help me.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top