使用链接的MySQL服务器通过ODBC MySQL驱动程序在下面执行SQL查询时出现错误。
这是代码...
INSERT IGNORE INTO OPENQUERY (MYSQL, 'SELECT ITEM_CODE, PRODUCT, PRODUCT_DESC_1, VENDOR, SELL_QUANTITY_ORDERED, SELL_UNIT_OF_MEASURE, DATE_ORDERED, DATE_DUE, JOB_NUMBER, ITEM_ORDER, DATE_SHIP_BY FROM software_joblogportal.line_item')
(ITEM_CODE, PRODUCT, PRODUCT_DESC_1, VENDOR, SELL_QUANTITY_ORDERED, SELL_UNIT_OF_MEASURE, DATE_ORDERED, DATE_DUE, JOB_NUMBER, ITEM_ORDER, DATE_SHIP_BY)
SELECT ITEM_CODE, PRODUCT, PRODUCT_DESC_1, VENDOR, SELL_QUANTITY_ORDERED, SELL_UNIT_OF_MEASURE, DATE_ORDERED, DATE_DUE, JOB_NUMBER, ITEM_ORDER, DATE_SHIP_BY FROM CBSPORTAL.WebCBS.dbo.Software_LINE_ITEM
在可能的情况下,尝试寻找一种方法使IGNORE INTO与OPENQUERY一起使用。
错误: “消息156,第15级,状态1,第1行 关键字“ INTO”附近的语法不正确。”