Link to home
Start Free TrialLog in
Avatar of stephenz43
stephenz43

asked on

Sql Insert statement

I have a access database that ihas multiple tables in it . One table " tblChemistry" needs data inserted from a dbf file called tblData. The table tblData  resides  on a mapped drice z:...... I would like to be able to insert this data without using the import function in access. I cant figure out the sqlinsert stamant

Thanks guys
Avatar of samtran0331
samtran0331
Flag of United States of America image

all you need is the sql? is the dbf file linked into the access db then?
if tblChemistry and tblData have the exact same number of fields and the fields match, you can:
INSERT INTO tblChemistry  SELECT * FROM tblData

if you need to do some "mapping" of the fields:
INSERT INTO tblChemistry (field1, field2, field3) SELECT field2, field4, field7 FROM tblData
Avatar of stephenz43
stephenz43

ASKER

the dbf file is not linked to the access mdb..... Its just a standalone file that need to be inserted into an file. all the field names match and the number of fields are the same
ASKER CERTIFIED SOLUTION
Avatar of samtran0331
samtran0331
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial