Thanks,
First I fixed the origional problem of not enough rows (the query was
grouping where it shouldn't be), but now I have a new issue the table is
about 2000 rows too large.
Let me give you some background before I post the SQL (it s quite long). I
have a table that I import containing a bunch of servie/repair info. This
table list parts by number, my boss want to see parts by name and number.
The table is over 250,000 rows large so manual data entry isn't really
efficient.
So basically I want to add a part name column to the original table that
contains the correct part name for each corresponding part number.
So first I created a new table with 2 rows (a part number row and a part
name row). Then i designed a simple make table query joining the 2 tables
by part number and outputing a new table showingall the original columns plus
the part name column.
This is where the problem occrs. The new table is about 2000 rows larger
then the origional table. Why would this be happening? I have no primary
key and the row are not indexed (I inherited this table and due to doubles it
won't let me assign a primary key)
Here is the SQL:
SELECT *****(these are all the columns i need displayed)****
[all so raw Before Part Numbers].SYSORD,
[all so raw Before Part Numbers].REPORD,
[all so raw Before Part Numbers].CHGCDE,
[all so raw Before Part Numbers].PARTNO,
[Part Number List].PartName, ***(this is the new column )****
[all so raw Before Part Numbers].SERIAL,
[all so raw Before Part Numbers].FAILCD,
[all so raw Before Part Numbers].REPCDE,
[all so raw Before Part Numbers].MONTH,
[all so raw Before Part Numbers].YEAR,
[all so raw Before Part Numbers].MODEL,
[all so raw Before Part Numbers].CO,
[all so raw Before Part Numbers].BILLTO,
[all so raw Before Part Numbers].CUSNAM,
[all so raw Before Part Numbers].CUSCTY, [all so raw Before Part
Numbers].CUSST,
[all so raw Before Part Numbers].SDATE,
[all so raw Before Part Numbers].EDATE,
[all so raw Before Part Numbers].LBRHRS
INTO [all so raw]
***here is the join statement******
FROM [all so raw Before Part Numbers] LEFT JOIN [Part Number List] ON [all
so raw Before Part Numbers].PARTNO = [Part Number List].PARTNO;
Jerry Whittle said:
Show us the SQL. Open the query in design view. Next go to View, SQL View
and copy and past it here. Information on primary keys and relationships
would be a nice touch too.
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.
:
Morning,
I have created a make tabke query to join 2 table (say table 1 and table
2) to make a third (table 3). I have selected option 2 in the join
properties ("include ALL records from table one and only those records from
table 2 where the joined fields are equal.")
When I run the query in end up ~5000 rows short on my final table (origional
table (1) had 273737 new table (3) has 268787).
Why is this happening if all the rows from table 1 are supposed to be
included?
If this is normal is there any way around this?
Notes: I am using Access2003 and am still new to Access in general.
I can supply more detaisl if needed. thanks for your help