Do Not Keep NULLS using SSIS Bulk Insert - Insert Empty String Ins

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



I have two SSIS packages that import from the same flat file into the same
SQL 2005 table. Both packages use the same Connection Managers. The SQL
table allows NULL values for all fields. The flat file has "empty values"
for certain columns.

The first package uses the Data Flow Task with the "Keep nulls" property of
the OLE DB Destination Editor unchecked. When this task is executed no null
values are inserted into the SQL table for the "empty values" from the flat
file. Empty string values are inserted instead of NULL.

The second package uses the Bulk Insert Task with the "KeepNulls" property
for the task set to "False". When the task is executed NULL values are
inserted into the SQL table for the "empty values" from the flat file.

I want to have the exact same behavior on my data in the Bulk Insert Task as
I do with the Data Flow Task. Using the Bulk Insert Task, what must I do to
have the Empty String values inserted into the SQL table where there is an
"empty value" in the flat file? Why & how does this occur automatically in
the Data Flow Task?
.



Relevant Pages

  • Re: SQL 2005, DTS & Integration Services column mappings...
    ... task Flat File to SQL Server and everything including ... In the original column mappings exist, ... of course, but when I migrate the package to SQL 20005, everything ... migrating some SQL 2000 DTS packages to our new server. ...
    (microsoft.public.sqlserver.dts)
  • Re: SQL 2005, DTS & Integration Services column mappings...
    ... Flat File to SQL Server and everything including mappings came over. ... I have simply have a flat file that is comma delimited, and an importing into a table. ... In the original column mappings exist, of course, but when I migrate the package to SQL 20005, everything comes over EXCEPT the column mappings. ... some SQL 2000 DTS packages to our new server. ...
    (microsoft.public.sqlserver.dts)
  • Bypass step when source file empty
    ... I have a DTS package where one of the step is to load a flat file into a sql ... The source file can sometimes be empty. ...
    (microsoft.public.sqlserver.dts)
  • Re: System.OutOfMemoryException was thrown
    ... XML message and a Flat File Assembler in a send pipeline parses the xml ... then my orchestration pick this flat file from my floder and send to MQ ... returned by Sql server, ... Exception type: PersistenceItemException ...
    (microsoft.public.biztalk.general)
  • RE: SSIS Perf question
    ... Per your question, when exectuing packages, sql queries/SPs are still ... SSIS engine is to process the workflow of the ...
    (microsoft.public.sqlserver.dts)