.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Using Conditional Split data Transfer in SSIS 2008

Posted By: Amit Mehra     Posted Date: April 02, 2010    Points: 2   Category :Sql Server
This article uses the Integration Services Conditional Split Data Transformation element to filter and transfer data from a set of flat text files to SQL Server database table. The concept can be easily extended to apply to any other source or destination such as Microsoft Excel. This scenario is useful in creating denormalized database tables in a reporting and analysis situation.

View Complete Post

More Related Resource Links

ssis sql 2000 image to 2008 varbinary Failed to retrieve long data for column

Hi, I have a task that to migrate the image type column from sql 2000 to varbinary type in sql 2008. The source column having 3812353 max datalength size for the column. The package always failed with following error message. [OLE DB Source [13177]] Error: Failed to retrieve long data for column "attch_file_content_t". [OLE DB Source [13177]] Error: There was an error with output column "attch_file_content_t" (13209) on output "OLE DB Source Output" (13187). The column status returned was: "DBSTATUS_UNAVAILABLE". [OLE DB Source [13177]] Error: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The "output column "attch_file_content_t" (13209)" failed because error code 0xC0209071 occurred, and the error row disposition on "output column "attch_file_content_t" (13209)" specifies failure on error. An error occurred on the specified object of the specified component. There may be error messages posted before this with more information about the failure. Meng Chew

Configurable SSIS data transfer package

I have to create SSIS Pakage for importing data form a sql server to  another. And this SSIS data transfer package has to be configurable at run time for: - Database source connection - Database destination connection - Query to call from the source database - Table to insert in destination database And Also need to call this package from a stored procedure...

Can not transfer data usisng SSIS

Database Server is SQL2008 with SP1. I created ODBC that connects to one table in the database in the server. It works fine. Then I created a SSIS package that tranfer this table's data into another table using the ODBC. When executing the SSIS , it works fine. No problem transfering data using ODBC via SSIS. Requirement is to use SSIS package in SQL Server job and run it from there. When the SQL job is run , it fails.  Error thrown is Message Executed as user: CORE\svc_prodsql1. Microsoft (R) SQL Server Execute Package Utility  Version 10.0.2531.0 for 64-bit  Copyright (C) Microsoft Corp 1984-2005. All rights reserved.    Started:  12:42:08 PM  Error: 2010-08-26 12:42:08.39     Code: 0xC0016016     Source:       Description: Failed to decrypt protected XML node "DTS:Password" with error 0x8009000B "Key not valid for use in specified state.". You may not be authorized to access this information. This error occurs when there is a cryptographic error. Verify that the correct key is available.  End Error  Error: 2010-08-26 12:42:08.75     Code: 0xC0047062     Source: Data Flow Task ADO NET Source [16]     Description: System.Data.Odbc.OdbcException: ERROR [IM002] [Microsoft]

Using User Variables (ONLY) in SSIS Conditional Split

After considerable effort I have not been able to perform a successful conditional split on a user variable. The idea is that I am reading a flat file, and I place the number of rows read into a variable (variable A). I then do some data conversion and perform another row count (variable B) I would like to do a conditional split if the value of variable A <> value of variable B. I am not referring to any of the query columns in making this comparison. It is always evaluating to the value of the variables before the package is run. For example if variable a=0 and variable b=0 at the start of the package, the conditional split evaluates to true (since 0=0) What I am failing to see is a's value getting updated and b's value getting updated in the conditional split. I have added watches for the variable and they are updating, but the boolean a==b is not. Any help is appreciated.

SSIS 2008 data type bug



I am using SSIS 2008, I set a varaible @t1 to data type CHAR and set the value to Y next I used an Execute SQL Task with an ADO.NET connection to SQL 2008 R2 database to insert this the value of @t1 into a test table with only 1 column of data type NCHAR(1):

insert into test1

On the Parameter Mapping section of this task I put the Data Type as String and initially set the Parameter size to -1  

The only problem is it tries to insert a 2 character numeric value into the SQL table. If I set the value of @t1 to N the parameter mapping seems to convert this to 78, when I set the value of @t1 to Y the parameter mapping converts this to 89 it looks like it converts the character to an ASCII code.

Is this meant to be the intended behaviour, as all I wanted to do was insert the actual character into the destination column and not the ASCII code?



Incremental data load from MySQL database to SQL server 2008 using SSIS


I am looking for best solution to perform incremental data load from MySQL database to SQL Server 2008.  I tried to follow instructions from articles on incremental data load in SSIS  using MD5 hashes but I failed to make connection in Lookup transformation editor between MySQL Id (4 byte unsigned integer) and Id in SQl Server 2008 table which is  bigint. i tried to add  data conversion and convert MySQl Id to string. It works fine when you map this field directly to OLEDB destination but in Lookup component it failed. 


Any input greatly appriciated.



how to use split in iif conditional expression in ssrs 2008 r2



how can i use conditional iif combined with split?

i'm trying to get values from check boxes(from sharepoint custom list), the condition is like this :

if the value is null/blank, the return value would be "-"

if the value is not blank, the return value would be the value of the check box field that already splitted from the ";#" character

as you might know, values from check box is written along with ";#" character before and after the value itself.

i tried to use this expression:

=IIF(Fields!Action__For_User_Access_.Value Is Nothing," - ",(Split(Fields!Action__For_User_Access_.Value, ";#")(1)))

the split worked just fine, but the conditional iif didn't work.

can anybody help me?

i used that expression in the calculated field.

btw, i'm using report builder content type from ssrs 2008 r2


thx in advance.



Visual Studio 2008 crashes on SSIS Data Flow Task opening


Visual Studio 2008 crashes on SSIS Data Flow Task opening.
This is a random behavior on random SSIS packages on Data Flow Task opening on packages that I've finished developing last week. The packages does not executes with error.

Error Description from Event Viewer:
Faulting application devenv.exe, version 9.0.30729.1, stamp 488f2b50, faulting module msdds.dll, version 9.0.30729.1, stamp 488f2e31, debug? 0, fault address 0x00012b6a.

I'm runnig SSIS development against SQL SERVER 2008 ENT 64.

There is already a fix for this ?

My environment description:
Microsoft Visual Studio 2008
Version 9.0.30729.1 SP
Microsoft .NET Framework
Version 3.5 SP1
Installed Edition: Professional

Microsoft Visual Basic 2008 91605-270-4167253-60984
Microsoft Visual Basic 2008
Microsoft Visual C# 2008 91605-270-4167253-60984
Microsoft Visual C# 2008
Microsoft Visual Studio 2008 Tools for Office 91605-270-4167253-60984
Microsoft Visual Studio 2008 Tools for Office
Microsoft Visual Web Developer 2008 91605-270-4167253-60984
Microsoft Visual Web Developer 2008
Crystal Reports    AAJ60-G0MSA4K-68000CF
Crystal Reports Basic for Visual Studio 2008
KB944899, KB945282, KB946040, KB946308, KB946344, KB946581, KB947171, KB947173, KB947180, KB947180, KB947180, KB94

Adding exception table to incremental Load with SSIS Lookup task and conditional split



I have built an incremental load ETL Process to load some flat files with an SSIS Lookup and Conditional Split. I only have one path in the conditional split and that is for New Records.

I have two questions:

1.       For the new records path, I have to check to see if a record exists and I don’t have a single key that is unique, therefore, I have to use a multiple keys to make the record unique.


Below is what I have put in the conditional transformation editor for my first output condition:


DateTime Validation in SSIS using conditional split



I am facing issue with null validation for DateTime. I have input csv file which contains DateTime field as Date datatype. In the destination database table, I am storing this field as datetime. I am using conditional split feature of SSIS package and try to validate this field before inserting into the database.

The value which is going into the db is "1899-12-30 00:00:00.000". I dont know why?

I have tried various expressions like ISNULL(DateTime), LEN(DTSTR, DateTime) == 0, ISNULL(DateTime) ? False : DateTime. Nothing is working.

Req is simple, if date is valid insert in db otherwise write is as bad data in error log file.

Can anyone provide suggestion on this.




SSIS Conditional Split


 i created a small DTS flow which is fetching data from OLD DB source to two  flat files using condition given in Conditional Split Transformation


Conditional Spilt has two condition according to source table column as given

Case1      Department == "IT"

Case2      Department == "Management"

Case3      Department == "Sales"

now as per this Case "IT", "Management" and "Sales" i am generating the flatfiles in three location C:\IT , C:\Management , C:\ Sales folder respectevly


this package is running fine but here the logical problem occurs, All the files are generating with accurate records in there respective folders but simultanuasly two other file also generating in all folders. which is not required,

it seems the condition which get satisfied executes and generate the file in there respective folders and fill the record in that file but other 2 case2 is also executing simultaneously and generating blank files

Assistance is highly appreciable.

Thanks in advance






2008 SSIS and NUMA Memory issues and BLOB Data Types


We're running SSIS 2008, moving data from an Oracle 10g database to a SQL 2008 database.  The SSIS is running on the same machine as the SQL Destination server.  The server has 8 gigs and is windows 2003 sp2

The issue we're having is when our package pulls a blob data type from oracle it will just quit with no errors at about 1.4 million records.   We know there are 6 millions records in the dataset. 

A friend of mine said it was a NUMA Memory issue that it is running out at some point and SSIS thinks the incoming data is finished.  Unfortunately, she said there was no answer. 

I was wondering if someone else had a simliar situation moving blobs from Oracle?


(SSIS 2008) What are the precise numerical sizes (in bytes) of the date data types in SSIS?


I have been reading the famous Integration Services: Performance Tuning Techniques document and I want to use the guidance in the Buffer Sizing section.

In order to optimize my settings for DefaultMaxBufferRows and DefaultMaxBufferSize, I need to calculate the Estimated Row Size for my Data Source.

However, when I look to the Integration Services Data Types document I find that several of the data types do not explicitly list their size in bytes.

(DT_BOOL also isn't listed but the assumption must be it's one bit)

Does anyone know how big (in bytes) these data types are? The Estimated Row Size can't be found without them.


Peter Kral

Cutting Edge: Pros and Cons of Data Transfer Objects


After a brief refresher on procedural and object based patterns for organizing the business logic layer, the author focuses on data transfer objects and the impact they have on the development of the software project.

Dino Esposito

MSDN Magazine August 2009

Under The Table: Spatial Data Support In SQL Server 2008


New spatial data support in SQL Server 2008 opens the door to mapping and querying geometric and geographic data, allowing you to build exciting new applications.

Bob Beauchemin

MSDN Magazine February 2009

Hierarchy ID: Model Your Data Hierarchies With SQL Server 2008


Here we explain how the new hierarchyID data type in SQL Server 2008 helps solve some of the problems in modeling and querying hierarchical information.

Kent Tegels

MSDN Magazine September 2008

Marshalling Your Data: Efficient Data Transfer Techniques Using COM and Windows 2000


The way you choose to transfer data is vitally important in a distributed application. Windows 2000 provides several new features that allow you to transfer data more efficiently. Lightweight handlers allow you to write smart proxies that can cache results and perform buffered reads and writes, minimizing the number of network calls. Windows 2000 also allows you to use pipe interfaces to transfer large amounts of data efficiently through a read-ahead facility. This article illustrates several ways to improve data transfer in Windows 2000 using these new features. It also reports the results of transfer time tests and provides recommendations for transferred buffer sizes.

Richard Grimes

MSDN Magazine September 2000

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend