主题:求各位大师帮忙看下我的SQL哪里错了
求各位大师帮忙看下我的SQL哪里错了
vb6中使用以下语句出错,但去掉前面的"insert into DLs(DLID)"就正常了,字段"DLID"数据类型都为INT长度为4,求各位大师帮忙看下
Call openRs("insert into DLs(DLID) Select UFDATA_111_2008..DispatchLists.DLID,UFDATA_111_2008..DispatchLists.cInvCode,UFDATA_111_2008..DispatchLists.cInvName,UFDATA_111_2008..DispatchLists.iQuantity,UFDATA_111_2008..Warehouse.cWhName,UFDATA_111_2008..RdRecord.cCode,UFDATA_111_2008..Inventory.iInvWeight,UFDATA_111_2008..Inventory.iVolume from UFDATA_111_2008..DispatchLists Inner join UFDATA_111_2008..DispatchList on UFDATA_111_2008..DispatchList.DLID = UFDATA_111_2008..DispatchLists.DLID Left outer Join UFDATA_111_2008..Warehouse on UFDATA_111_2008..DispatchLists.cWhCode = UFDATA_111_2008..Warehouse.cWhCode Left outer join UFDATA_111_2008..Inventory on UFDATA_111_2008..DispatchLists.cInvCode = UFDATA_111_2008..Inventory.cInvCode Left outer join UFDATA_111_2008..RdRecord on (UFDATA_111_2008..RdRecord.cBusCode = UFDATA_111_2008..DispatchList.cDLCode and UFDATA_111_2008..RdRecord.cWhCode = UFDATA_111_2008..DispatchLists.cWhCode) where UFDATA_111_2008..DispatchList.DLID='" & iUDLID & "'")
vb6中使用以下语句出错,但去掉前面的"insert into DLs(DLID)"就正常了,字段"DLID"数据类型都为INT长度为4,求各位大师帮忙看下
Call openRs("insert into DLs(DLID) Select UFDATA_111_2008..DispatchLists.DLID,UFDATA_111_2008..DispatchLists.cInvCode,UFDATA_111_2008..DispatchLists.cInvName,UFDATA_111_2008..DispatchLists.iQuantity,UFDATA_111_2008..Warehouse.cWhName,UFDATA_111_2008..RdRecord.cCode,UFDATA_111_2008..Inventory.iInvWeight,UFDATA_111_2008..Inventory.iVolume from UFDATA_111_2008..DispatchLists Inner join UFDATA_111_2008..DispatchList on UFDATA_111_2008..DispatchList.DLID = UFDATA_111_2008..DispatchLists.DLID Left outer Join UFDATA_111_2008..Warehouse on UFDATA_111_2008..DispatchLists.cWhCode = UFDATA_111_2008..Warehouse.cWhCode Left outer join UFDATA_111_2008..Inventory on UFDATA_111_2008..DispatchLists.cInvCode = UFDATA_111_2008..Inventory.cInvCode Left outer join UFDATA_111_2008..RdRecord on (UFDATA_111_2008..RdRecord.cBusCode = UFDATA_111_2008..DispatchList.cDLCode and UFDATA_111_2008..RdRecord.cWhCode = UFDATA_111_2008..DispatchLists.cWhCode) where UFDATA_111_2008..DispatchList.DLID='" & iUDLID & "'")