RE: select Statement w/i inner joins
- From: ToniS <ToniS@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 16 Jul 2008 13:45:01 -0700
as soon as I did that I ended up with 145 records when I should have 182...
I ended up adding tableB amount >0 or tableC.amount > 0 and that seemed to
work, thanks for the idea of adding a where clause...
"ToniS" wrote:
I am having a select problem, below is what I am after..
TableA
Number
1
2
3
4
5
TableB
Number Amount
2 100
3 50
4 175
TableC
Number Amount
2 180
5 189
Results looking for
Number TableB Amount TableC Amount
2 100 180
3 50
4 175
5 189
I would like to select information from tableB and TableC where the number
exists with in TableA
Something along the lines of
SELECT TableA.Number, TableB.Amount, TableC.Amount
FROM (TableA INNER JOIN TableB ON TableA.Number = TableB.Number)
INNER JOIN TableC ON TableA.Number = TableC.Number
TableC has 168 records where the number exists with in tableA So I know I
should at least get a result with 168 records or
more. With the above select statement I get a result of 145.
Any ideas on what I am doing wrong?
Thanks
Toni
- References:
- select Statement w/i inner joins
- From: ToniS
- select Statement w/i inner joins
- Prev by Date: RE: Hard to explain - multiple update fields query...
- Next by Date: Re: Hard to explain - multiple update fields query...
- Previous by thread: Re: select Statement w/i inner joins
- Next by thread: Re: Limit query to one result
- Index(es):
Relevant Pages
|