errorCode": "2200"--Must declare the table variable \"@item\" RRS feed

  • Question

  • Hello ,

    Am just 1 week old to ADF and got stuck at one scenario. I am loading the data from 100 tables from source DB to Target DB and implemented with Merge SP in Target DB. In Adf, I used look up to get all these data into variable and pass these to foreach copy data. In copy, I used source query , SP name ,utt as variables to make it dynamic. But while execution, I am getting the following error. I tried many ways but unable to fix. Appreciate the leads, Thanks in advance.

    { "errorCode": "2200", "message": "Failure happened on 'Source' side. ErrorCode=SqlOperationFailed,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=A database operation failed with the following error: 'Must declare the table variable \"@item\".',Source=,''Type=System.Data.SqlClient.SqlException,Message=Must declare the table variable \"@item\".,Source=.Net SqlClient Data Provider,SqlErrorNumber=1087,Class=15,ErrorCode=-2146232060,State=2,Errors=[{Class=15,Number=1087,State=2,Message=Must declare the table variable \"@item\".,},],'", "failureType": "UserError", "target": "Merge sampleDB dbo Emp", "details": [] }


    Tuesday, December 31, 2019 10:05 AM

All replies