RE: select Statement w/i inner joins

Tech-Archive recommends: Fix windows errors by optimizing your registry



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



.



Relevant Pages

  • Re: select Statement w/i inner joins
    ... In my below example number 1 does not have any data in TableA or TableB ... Number TableB Amount TableC Amount ... FROM (TableA INNER JOIN TableB ON TableA.Number = TableB.Number) ...
    (microsoft.public.access.queries)
  • select Statement w/i inner joins
    ... I would like to select information from tableB and TableC where the number ... FROM (TableA INNER JOIN TableB ON TableA.Number = TableB.Number) ...
    (microsoft.public.access.queries)
  • Re: Type mismatch error in SQL expression...
    ... > INSERT INTO tableC ... > SELECT tableA.* ... The comparison columns in both tables must be the same data type. ...
    (microsoft.public.access.queries)
  • Re: Joinning 3 tables
    ... Inner Join tableB b ... Inner Join tableC c ...
    (microsoft.public.sqlserver.programming)
  • Type mismatch error in SQL expression...
    ... I'm getting a type mismatch error in the following expression and I can't figure it out (I'm a Novice): ... INSERT INTO tableC ... SELECT tableA.* ... INNER JOIN tableB ON AND ...
    (microsoft.public.access.queries)