【发布时间】:2019-06-26 15:38:44
【问题描述】:
我编写了如下所示的查询,将数据从一个表复制到另一个表。一切似乎都很好,但是当代码运行时,我得到一个错误 - ','附近的语法不正确。
请帮忙。
USE [DWCNEW]
INSERT into DWCNEW..PostAP
SELECT TxDate, Id, AccountLink, TrCodeID, Debit, Credit, iCurrencyID, fExchangeRate, fForeignDebit, fForeignCredit, Description, TaxTypeID, Reference, Order_No, ExtOrderNum, cAuditNumber, Tax_Amount, fForeignTax, Project, Outstanding, fForeignOutstanding, cAllocs, InvNumKey, CRCCheck, DTStamp, UserName, iTaxPeriodID, cReference2, iAge, dDateAged, iPostSettlementTermsID, iTxBranchID, bPBTPaid, iGLTaxAccountID, bTxOnHold, PostAP_iBranchID, PostAP_dCreatedDate, PostAP_dModifiedDate, PostAP_iCreatedBranchID, PostAP_iModifiedBranchID, PostAP_iCreatedAgentID, PostAP_iModifiedAgentID, PostAP_iChangeSetID
FROM DWCLive22..PostAP
【问题讨论】:
-
将
..都更改为.,例如将DWCNEW..PostAP更改为DWCNEW.PostAP -
SQL Server 2012
标签: sql-server tsql sql-insert