sql - Inner Join Excel recordset with Access recordset -


is possible make inner join between excel spreadsheet , and access database table? tried many ways make possible no success.

this visual basic 6 code:

dim dbtemp database dim exceldb database dim xlsrs recordset  set dbtemp = opendatabase(app.path + "\mydb.mdb") set exceldb = opendatabase(app.path + "\queryexceldata.xls", false, true, "excel 8.0;") set xlsrs = exceldb.openrecordset(query, dbopendynaset) ' query sql query used other results  until xlsrs.eof         workspaces(0).begintrans             sql =  "insert presenze(enterprise, emp_id, myear, mmonth, mday, workhours) " _                  & " select presenze.emp_id, '"+xlsrs("entps")+"', '" + xlsrs("yr") + "', '" + " _                  & " xlsrs("mnth") + "', '" + xlsrs("dy") + "', '" + xlsrs("wh") + `"' " _                 & " [exceldata$] inner join presenze on [exceldata$].[cardid] = presenze.cardid"             dbtemp.execute sql         workspaces(0).committrans         xlsrs.movenext loop 

i want data [exceldata$] spreadsheet , insert them access table "presenze" can me?

the realistic way create import table in access db , copy data excel join table. way don't have recreate join everytime data in excel changes.


Comments

Popular posts from this blog

php - Submit Form Data without Reloading page -

linux - Rails running on virtual machine in Windows -

php - $params->set Array between square bracket -