我收到以下错误消息:查询表达式中缺少3075运算符
这里有一小段代码:
Dim dbs As Database
Set dbs = CurrentDb()
dbs.Execute "DELETE FROM TempTable_Entity_mapping_DEFSET_Selection;"
Do While Not rsDEFSET.EOF
Debug.Print rsDEFSET.Fields.item("RESULT").Value
MIP = rsDEFSET.Fields.item("FK_DIM_MBR_ITEM").Value
KPIName = rsDEFSET.Fields.item("SHORTNAME_MBR").Value
ID = rsDEFSET.Fields.item("RESULT").Value
DefSetName = rsDEFSET.Fields.item("KPI_DEFSET_NAME")
Scenarios = rsDEFSET.Fields.item("SCENARIOS")
fillTempTab = "INSERT INTO TempTable_Entity_mapping_DEFSET_Selection (MIP, KPIName, ID, DefSetName, Scenarios) VALUES ('" & MIP & "','" & KPIName & "','" & ID & "','" & DefSetName & "','" & Scenarios & "');"
Debug.Print fillTempTab
dbs.Execute fillTempTab
rsDEFSET.MoveNext
Loop
答案 0 :(得分:0)
看起来你错过了你想在SQL语句中删除的内容
您的第一个查询应该是
DELETE * FROM TempTable_Entity_mapping_DEFSET_Selection;