Export of Null Value

  • hi,

    please tell me what to do to export the null values as null in the flat files(.txt).

    Iam right now getting only blank values when tried with unicode type

    for example:

    my table values are like this :

    col1 col2 col3 col4

    1 ksk null ccd

    when i tried to export in unicode , the result i;m getting is

    1,ksk,,ccd

    now what i need is

    1,ksk,null,ccd

    kindly help ➡

    thanks & regards,

    Shankar

  • If you want the text 'null' to appear instead of an empty output field, you could send each column through a derived column transform: ISNULL([SomeField]) ? "null" : [SomeField]

  • How about the option where you retain Null values from the source as Null values in the Data Flow?

  • Unfortunately, the 'Keep NULLS' option only applies on an OLEDB destination, not an OLEDB source. That would work going flat file to db, but not db to flat file.

    In my case, any time I have to represent a NULL field value in a csv on my project, it goes out as an empty field, i.e. "text",numeric,,"text"...

  • I found a great posting while working on something irrelevant, and immediately thought about your posting on Nulls.

    http://ssisblog.replicationanswers.com/2007/11/24/retain-null-values-vs-keep-nulls--which-to-use.aspx

    This may provide you with a little assistance as to which configuration is best applicable for your nulls scenario

    ~PD

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply