Subject | Join types |
---|---|
Author | Lester Caine |
Post date | 2004-08-16T10:41:50Z |
Time to show my ignorance ;)
I have a table with part numbers and details, and a second with batches
of stock. So some parts will have no stock and some will have several
batch entries.
What I need to produce is a query that returns every part number and
additional records where there are batches in stock.
n1 - 0 - 0
n2 - 23 - b1
n2 - 23 - b2
n3 - 0 - 0
I know this is a join, but I keep going round in circles ( and helen's
book hasn't arrived yet ;) ).
Do I need an LEFT,RIGHT,INNER,OUTER join ?
( I'm trying to get this to bed before going into hospital for some more
tests, for which I'm 'nil by mouth' so hunger is distracting my
concentration :( )
--
Lester Caine
-----------------------------
L.S.Caine Electronic Services
I have a table with part numbers and details, and a second with batches
of stock. So some parts will have no stock and some will have several
batch entries.
What I need to produce is a query that returns every part number and
additional records where there are batches in stock.
n1 - 0 - 0
n2 - 23 - b1
n2 - 23 - b2
n3 - 0 - 0
I know this is a join, but I keep going round in circles ( and helen's
book hasn't arrived yet ;) ).
Do I need an LEFT,RIGHT,INNER,OUTER join ?
( I'm trying to get this to bed before going into hospital for some more
tests, for which I'm 'nil by mouth' so hunger is distracting my
concentration :( )
--
Lester Caine
-----------------------------
L.S.Caine Electronic Services