0

我收到以下错误消息:查询表达式中缺少 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
4

1 回答 1

0

看起来您缺少要在 SQL 语句中删除的内容

您的第一个查询应为

DELETE * FROM TempTable_Entity_mapping_DEFSET_Selection;
于 2013-02-21T20:56:33.020 回答