Questions tagged [execute-sql-task]

Execute SQL Task in SSIS is used to execute SQL statements or stored procedures in a relational database.

Execute SQL Task in SSIS is used to execute SQL statements or stored procedures in a relational database. This Task need a connection manager to establish a connection with a data source and it supports several data sources other than SQL Server.


References and helpful links

66 questions
2
votes
2 answers

SSIS Execute SQL Task - Input String in wrong format

I have an Execute SQL Task which tries to execute a stored procedure, like this: EXEC usp_stored_proc ?, ?, ? OUTPUT, ? OUTPUT; I have 4 variables mapped to parameters. Ignoring the output parameters, these are both strings mapped to NVARCHAR…
TurgidWizard
  • 619
  • 1
  • 7
  • 22
2
votes
1 answer

SSIS ForEach - Get current value of collection

I have a Variable User:AllBatches (ObJect) populated from an ADO.NET SQL Query. The SQL query returns a single column of Integers. That part of my package is working. The next step is a ForEach Loop using the User:AllBatches as the variable…
iainc
  • 862
  • 6
  • 20
2
votes
1 answer

SSIS: Order by Column Full Result Set for Execute SQL Task

I have an Execute SQL Task placed before a Foreach Loop Container so that for every row returned by the Full Result Set a Script Tasks Inserts this into an Excel row. However, on one particular column I would like to sort the Full Result Set in ASC…
Shaye
  • 179
  • 13
2
votes
1 answer

I have two Foreach Loop,which hava same enumerated values.So how do I deal with it?

I declare two variables as "Object" named a and b, and have a simple SQL task:. select code from code_list Using Full result set, I'm trying to pass the result to the variables declared(a and b), and use them(a and b) on Script Task with two…
biasic
  • 21
  • 2
2
votes
1 answer

Store result in Execute Sql task

I have written a stored procedure which will return the columns BEID, Date_of_txn, Txn_Amount as a result after the execution. I am getting the result manually when I run the stored procedure in SQL Server Management Studio. But I want to execute…
Vishal Mishr
  • 195
  • 1
  • 8
2
votes
2 answers

Error with SQL query: The query failed to parse. Exception from HResult: 0x80040E14

I am using SSIS to create a data flow task to a postgresql server database. I get the Error with SQL query: The query failed to parse. Exception from HResult: 0x80040E14 See below screenshot: https://ibb.co/7KcBnMG https://ibb.co/zR093SQ The…
2
votes
3 answers

SSIS 2017 "Execute SQL Task" fails Could not find stored procedure

I'am using SSIS with an ADO.NET connection to Azure. Within SSIS I want to execute a procedure with one input and 2 output parameters. The input parameter is a static value. The Procedure works with T-SQL within SSMS. I setup the "Execute SQL Task"…
Erik hoeven
  • 1,442
  • 6
  • 26
  • 41
2
votes
2 answers

SSIS Error: 0xC002F210" Query is too complex.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly

I am trying to Execute the following query using an Execute SQL Task using an Excel connection:
sonu babu
  • 31
  • 2
2
votes
3 answers

How to execute only all SQL files of which name starts with a two digit number in a folder and ignore all other SQL files?

I have the following batch code which executes all SQL files of a folder. for /r %%G in (*.sql) do sqlcmd /S localhost /d superDB /U sa /P topsecret -i"%%G" pause But now I want to execute only the files which start with a two digit number in name…
Der_V
  • 177
  • 1
  • 16
2
votes
1 answer

SSIS component failure does not work

I am using Visual Studio 2017 and SQL Server 2016. I have a SSIS package and in that package I have a SQL Script Task that calls a simple script in which there is a error. I don't know why when there is a error , the flow does not go throw Failure…
Ardalan Shahgholi
  • 11,967
  • 21
  • 108
  • 144
1
vote
1 answer

SSIS - how to capture PRINT message?

The Execute SQL task calls a procedure that has a PRINT command inside. How can I display these messages at once in the progress tab (or in output)?
Vexator
  • 181
  • 3
  • 9
1
vote
1 answer

File counter expression in SSIS using execute process task output variable

I have a console application in c# that downloads files from a website. I have created a variable named Filecount that counts the number of files downloaded in that instance. In SSIS, I have set the StandardOutputVariable in the Execute process task…
1
vote
1 answer

Delete Fails using ODBC in SSIS

I changed an Execute SQL Task targeting my default, local SQL Server instance from OLE DB to ODBC. The SQL is delete from tablename The ODBC version works fine when the table has records but fails when the table is empty. I thought about using the…
stumit63
  • 61
  • 6
1
vote
1 answer

SSIS return total committed rows count in execute sql task

I have an Executed SQL Task with SQL query to delete the data from table. I am using while loop to delete the data in batch and try/catch to handle the failure. In Execute SQL Task I want to return the deleted record, so I added output parameters…
Sql Programmer
  • 213
  • 4
  • 17
1
vote
0 answers

SSIS Error: Disconnected recordsets are not available from ODBC connections

I have one EXECUTE SQL TASK in SSIS package , Task Type: Execute SQL TASK Data Source Type: ODBC for MySql (DSN) Error : [Execute SQL Task] Error: Executing the query "select * from nasb_dev.v_borrower_address" failed with the following…