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

SQL Inner Join

Status
Not open for further replies.

KaayJaay

IS-IT--Management
Jul 6, 2004
64
US
The "Tech_Data" table needs to inner join with the "Top 20 Installation Data" table, but i dont know how to reconfigure my query for the inner join. Any Suggestions?


My SQL query code:

SELECT TOP 5 * FROM [Top 20 Installation Data]
WHERE (((MT)="s52w1"))
AND [Tech_Data].DO > [Forms]![Repeats Interface]![Volume]

Union
SELECT TOP 5 MT, * FROM [Top 20 Installation Data]
WHERE (((MT)="s52w2"))
AND [Tech_Data].DO > [Forms]![Repeats Interface]![Volume]

Union
SELECT TOP 5 MT, * FROM [Top 20 Installation Data]
WHERE (((MT)="s52w3"))
AND [Tech_Data].DO > [Forms]![Repeats Interface]![Volume]

UNION SELECT TOP 5 MT, * FROM [Top 20 Installation Data]
WHERE (((MT)="s52w4"))
AND [Tech_Data].DO > [Forms]![Repeats Interface]![Volume];


KaayJaay
 
Chuck the select statement into the QBE and let access do the hard work for you :D

------------------------
Hit any User to continue
 
this may be a type, but your first query has:

SELECT TOP 5 *

and the remainder have

SELECT TOP 5 MT, *

that means that there are more fields in the last queries than in the first; there have to be the same number and type of fields in each query.

Leslie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top