LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 83
Default !@#$ Query with Joins???

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
MS Query Joins bmmulligan1 Excel Discussion (Misc queries) 1 February 1st 10 07:22 PM
Excel query via ODBC, left joins on multiple tables Todd Excel Discussion (Misc queries) 0 February 26th 09 05:42 PM
MS SQL Server Joins Concept venumadhav g[_2_] Excel Worksheet Functions 1 September 12th 08 06:49 AM
Outer Joins The Rook[_2_] Excel Discussion (Misc queries) 3 March 15th 07 04:20 PM
Multiple joins in an Excel Query Karen S Excel Programming 5 November 7th 03 11:21 PM


All times are GMT +1. The time now is 10:18 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"