Join Query.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am having trouble with a join query.

Currently my join statement is INNER JOIN a ON strategy=a.DescID. This
returns two rows from my table below since I have two descid for each.
However, I would like only one row returned by doing an additional lookup on
the memotypeid column. I tried INNER JOIN a ON strategy=a.DescID and
a.memotypeid=2, but this is failing. I know I could specify in the where
caluse to only return memotypeid of 2, but I want to be able to return
memotypid 1 in the same result set but in a different column. I know I am
missing something with the join statement. Thanks so much for your help!

UUID DescID MemoField memoTypeID
1 3891 Text Text Text 1
2 4117 Text Text Text 1
3 4125 Text Text Text 1
4 6658 Text Text Text 1
5 6659 Text Text Text 1
7 3891 Text Text Text 2
8 4117 Text Text Text 2
9 4125 Text Text Text 2
10 6658 Text Text Text 2
11 6659 Text Text Text 2
 
Please post the full SQL statement, or at least an exact copy of the 'join'
clause.
 
Back
Top