Questions tagged [script-task]

The Script task provides code to perform functions that are not available in the built-in tasks and transformations that SQL Server Integration Services provides. The Script task can also combine functions in one script instead of using multiple tasks and transformations. You use the Script task for work that must be done once in a package (or once per enumerated object), instead than once per data row.

Do not use this tag for the SSIS Script Component, instead use .

Check the following article for more information: SSIS Script task vs. Script Component


Based on the official SSIS documentation, SSIS tasks are categorized as the following: Data Flow Task, data preparation tasks, workflow tasks, SQL Server tasks, Analysis Services tasks, maintenance tasks, custom tasks, and scripting tasks.

The SSIS Script Task extends the package functionality by using scripts. It performs functions that are not provided by the standard Integration services tasks.

363 questions
0
votes
0 answers

How to import excel file using dynamic sheet name in SSIS

I am trying to import excel file and load it into sql sever database and i have created dynamic folder path and the file name as dynamic but my only issue is that i am not able to create dynamic sheet names. Users can put a new excel file with…
moe
  • 5,149
  • 38
  • 130
  • 197
0
votes
0 answers

Use SSIS C# script to run SQL plus SQL string

I am attempting to use a script task (C#) within SSIS (SQL Server 2008 BIDS) and am having trouble sending the actual SQL string to SQL plus. I can get it to take my username and password, but cannot seem to get it to take a SQL string from the C#…
GD1977
  • 1
-1
votes
1 answer

Syntax error (missing operator) in query expression in C# script task in SSIS

I get this error: System.Data.OleDb.OleDbException (0x80040E14): Syntax error (missing operator) in query expression ''O'Brien','O'Brien''. at System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(OleDbHResult hr) at…
-1
votes
1 answer

Script task not able to handle space in sheet name

Hi I have a script task which pick up the excel files from a folder. The files have several sheets with names 'Question 1', 'Question 2'....etc. My problem is that it is not reading or accessing the above sheet with 'space' in between Question and…
-1
votes
1 answer

Attach query result as excel in email without storing excel using ssis script task

I need to send query result of table as excel attachment in email using SSIS script task.I don't want to store excel as it will be in my production server. Can we send query result from table as abc.csv/abc.xls attachment over email. Can anyone help…
AKJ
  • 1
-1
votes
1 answer

SSIS Script Task check folder for any XML files

I'm using SQL Server 2014 \ SSIS. I have the below code within a Script Task to check if a folder contains any XML files: using System; using System.IO; using System.Data; using Microsoft.SqlServer.Dts.Runtime; using System.Windows.Forms; …
Michael
  • 2,507
  • 8
  • 35
  • 71
-1
votes
2 answers

Convert package variable of type System.Object to a List with SSIS C# Script task

I am using the following code: Object duplicateDevices = Dts.Variables["User::DuplicateDevices"].Value; List lstduplicateDevices = (List)duplicateDevices; User::DuplicateDevices is declared as…
NAGARAJA H I
  • 149
  • 3
  • 11
-1
votes
1 answer

How to download a file with a script Task in SSIS

I am struggling to use below vba in SSIS script Task. Basically it downloads a file from web and saves it on a shared drive . File is then loaded in SQL server.I have tried the code and it works in Excel VBA.I have modified the URL for security…
user3482527
  • 227
  • 1
  • 2
  • 22
-1
votes
1 answer

How do I download the most recent file from FTP using SSIS when the date value has a string data type

I have files that are named as follows and I want to only select the most recent file for each measure from an FTP site. I don't want to download all of them and delete the ones I don't need.…
Hmen
  • 41
  • 6
-1
votes
1 answer

Detecting an empty flat file with SSIS script task

I am looking for a script task which identifies a zero KB file in a folder and outputs the same in a mail or text file. Thanks in advance. Let me know for any questions.
MGM
  • 57
  • 1
  • 7
-1
votes
1 answer

SSIS script task - Having issue while parsing xml

Here is the sample xml
sam
  • 347
  • 2
  • 10
  • 26
-1
votes
1 answer

SSIS- retaining null values as null in the csv output file using script task

I am using execute sql task to read sql queries and then script task to write the query results into csv files using the method mentioned in the following post on this site- SSIS: Script task to write recordset to file (SSIS: Script task to write…
-1
votes
1 answer

Import data from one table and loop through another and extract the result using Script task

I have been asked to do a task which is import data from one table and loop through that data with another table and fetch the matching result using SSIS Script task or script component. I am very poor in script writing could anyone help me with…
Ravin2015
  • 1
  • 4
-1
votes
2 answers

SSIS script task control flow

I have 3 script tasks : Task1, Task2, and Task3. Now I need a control flow such that if both Task1 and Task2 completes successfully, Task3 should execute. I tried to use Precedence constraint, but don't know how it will work.
patel
  • 1
  • 1
-1
votes
1 answer

Check whether a file with random name exists in the folder-SSIS

I am trying to check if file exists in a folder using SSIS Script task. If I want to send out an email stating whether the file is present, then ForEachLoop can't be used. Also, my filename is random. Firstpart_Secondaprt.csv FirstPart is…
Manoj Soundararajan
  • 371
  • 1
  • 3
  • 13
1 2 3
24
25