Hello all,
I have an excel file linked in access and a table called main I've made a query to append the excel data (Table1) to the Main table as so:
Their are currently 10711 rows of data that i need to append. If I import it directly via excel I get Type Conversion Failure errors due to blank entries. Unfortunately they let injured production workers perform data entry thus null values and blanks - improper data galore. What I'm wondering is if I can logically do this in segments perhaps using the Primary Key. One thing I did do is Import the data and made sure the primary key autonumber count was the same as the number of rows in excel and I added the primary key field into the excel file to allow the query to work properly. This is the only idea I have come up with to allow this to work but this would mean multiple linked excel files and multiple query adaptations. Anyone care to take a crack at her?
EDIT: new idea is their a way to reference the primary key in an sql statement like so...
WHERE [Primary Key] >0 <500 ??? then i would just have to change the values each time i append the table!? /le confusions
I have an excel file linked in access and a table called main I've made a query to append the excel data (Table1) to the Main table as so:
Code:
INSERT INTO Main ( [Mth/Day], [DS/NS], Shift, Line, [Product Code], [Product Description], [Mat'l], Pcs, Quantity, [Total Run], [Std lbs/hr], [Actual Lbs/hr], [RD / QA Samples], [Scrap Code 1], [Scrap Lbs 1], [Scrap Code 2], [Scrap Lbs 2], [Scrap Code 3], [Scrap Lbs 3], Comments, [Total Scrap], [Scrap %] )
SELECT Table1.[Mth/day], Table1.[DS/NS], Table1.Shift, Table1.Line, Table1.[Product Code], Table1.[Product Description], Table1.[Mat'l], Table1.Pcs, Table1.Quantity, Table1.[Total Run], Table1.[Std lbs/hr], Table1.[Actual Lbs/hr], Table1.[RD / QA Samples], Table1.[Scrap Code 1], Table1.[Scrap Lbs 1], Table1.[Scrap Code 2], Table1.[Scrap Lbs 2], Table1.[Scrap Code 3], Table1.[Scrap Lbs 3], Table1.Comments, Table1.[Total Scrap], Table1.[Scrap %]
FROM Main, Table1;
Their are currently 10711 rows of data that i need to append. If I import it directly via excel I get Type Conversion Failure errors due to blank entries. Unfortunately they let injured production workers perform data entry thus null values and blanks - improper data galore. What I'm wondering is if I can logically do this in segments perhaps using the Primary Key. One thing I did do is Import the data and made sure the primary key autonumber count was the same as the number of rows in excel and I added the primary key field into the excel file to allow the query to work properly. This is the only idea I have come up with to allow this to work but this would mean multiple linked excel files and multiple query adaptations. Anyone care to take a crack at her?
EDIT: new idea is their a way to reference the primary key in an sql statement like so...
WHERE [Primary Key] >0 <500 ??? then i would just have to change the values each time i append the table!? /le confusions
Last edited: