Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2003
    Posts
    1

    Question Unanswered: Inserting Nulls with DTS

    I am using a DTS package to copy data from a flat file to a table. I need for fields that are empty to be changed to nulls in the output. I wrote a VB Script to do this, but now it takes about 10 times longer that when I used the Copy transformation. Is there a faster way to do this?

    I haven't tried the Trim transformation yet. (I'm waiting for my load to finish.) Will that place nulls in the output if a field is empty?

  2. #2
    Join Date
    Sep 2003
    Posts
    2

    Re: Inserting Nulls with DTS

    Originally posted by jsneeringer
    I am using a DTS package to copy data from a flat file to a table. I need for fields that are empty to be changed to nulls in the output. I wrote a VB Script to do this, but now it takes about 10 times longer that when I used the Copy transformation. Is there a faster way to do this?

    I haven't tried the Trim transformation yet. (I'm waiting for my load to finish.) Will that place nulls in the output if a field is empty?
    Hi,
    1-in your SQL Server Table ( Destination DB) set a default value for the field(s), so when you attemp to insert Null value in that Field, the specified default vale will be insert. ( the way of inserting is not important . It can be DTS!!)

    2- you can also write a Instead Of Trigger on your Table For Insert, so process the field value, if it's Null , write empty.

    Hope that help you
    Last edited by frahmani; 09-03-03 at 03:17.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •