Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Folks,
I'm trying to create a query that might require a join of somekind but after reading a number of web articles on joins I'm now more confused than ever... I have two tables that contain the data I need. The First table has two columns that relate to one column in my second table. I need to be able to pull about four or five values from my second table, and one value from my first table as it relates to the coresponding values from both. Since that probably makes little to no sense... SELECT DISTINCT Wearer.FrstName, Wearer.LastName, Garment.GarmDesc, Wearer.Labl, Wearer.Aloc01, Wearer.ChrgQnty01 FROM Garment, Wearer WHERE Wearer.GTypRcID01 = Garment.GTypRcID AND Wearer.GTypRcID02 = Garment.GTypRcID AND ((LMWearer.OrdrRcID=269) AND (LMWearer.Nact=0)) but when I do it this way I get no results. when i go with either Wearer.GTypRcID01 = Garment.GTypRcID or Wearer.GTypRcID02 = Garment.GTypRcID I get pants or shirts related to the wearer but I need to retrieve both. Please help before I split my head open from banging it against my keyboard :) Thanks to All!!! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
MS Query Joins | Excel Discussion (Misc queries) | |||
Excel query via ODBC, left joins on multiple tables | Excel Discussion (Misc queries) | |||
MS SQL Server Joins Concept | Excel Worksheet Functions | |||
Outer Joins | Excel Discussion (Misc queries) | |||
Multiple joins in an Excel Query | Excel Programming |