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

Formatting of query results

Status
Not open for further replies.

jabenj

Technical User
Joined
Dec 18, 2008
Messages
20
Location
US
Hi All. I made an INNER JOIN query that returns entries from two tables that are related by a common Lot#. So I want the query to record all entries, from two tables that are related to a Lot# that the user enters. I was able to do this, however, the query returns duplicate entries. It's returning data from both tables in the same row. I want it to return records distint to each table on separate rows. How do i DO this? My current query statement is as follows:

SELECT DISTINCTROW [Blendsheet Input].Date, [Blendsheet Input].Product, [Blendsheet Input].BatchNum, [Blendsheet Input].TransferredWeight, [Blendsheet Output].Weight, [Blendsheet Output].Customer, [Blendsheet Output].Date
FROM [Blendsheet Input] INNER JOIN [Blendsheet Output] ON [Blendsheet Input].LotNum = [Blendsheet Output].[Lot #]
WHERE ((([Blendsheet Input].LotNum)=[Enter Lot#]));

Thanks for any help in advance
 
records distint to each table on separate rows
Like an UNION query ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Yes. Records distinct to each table on separate rows. Tried a union query. Couldn't get it to work. Maybe i was doing someting wrong. But is a union query what i need?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top