Flat File Import and Null Values

Tech-Archive recommends: Fix windows errors by optimizing your registry



Hi all,

This is my first time posting, as well as my first time using DTS. I find myself
in a bit of a quandary. I'm trying to import data from a flatfile into a SQL
database, using the ActiveX VBscript engine. I want the fields which are nothing
but spaces to be true 'null' values in SQL. I'm using a function which sets any
field which contains nothing but spaces equal to "" (empty string). In the case
of the numeric fields, this works perfectly. However, the char and varchar field
types seem to insert an empty value, but not a null. I've got the checkbox for
'keep null values' turned on. How would I go about inserting a null value into
these fields?
Any help would be greatly appreciated.

Thanks in advance,
~Gary

--
Posted via a free Usenet account from http://www.teranews.com

.



Relevant Pages

  • Re: Appending to a text file in Sql DTS
    ... The DTS package works fine for the first time and subsequent runs when the ... a header file and the data file. ... >>>I need to export some data to a text file from sql server. ... I'm using Sql DTS ...
    (microsoft.public.sqlserver.dts)
  • Re: Flat File Import and Null Values
    ... This is my first time posting, as well as my first time using DTS. ... but spaces to be true 'null' values in SQL. ... field which contains nothing but spaces equal to "" (empty string). ...
    (microsoft.public.sqlserver.dts)
  • Re: Help me about Data Driven Query Task
    ... then make the same change on the destination database. ... First I build connection connection1 of the Source SQL 2K Server,and ... My english is poor,and i use DTS first time. ...
    (microsoft.public.sqlserver.dts)
  • Re: someone help
    ... "Hugo Kornelis" wrote: ... >>first time I am creating SPs.. ... That's not how SQL works. ... A few well-chosen rows of sample data, ...
    (microsoft.public.sqlserver.clients)
  • Re: Slow execution of a stored procedure
    ... When SQL Server compiles the SP it does not know the value of the local ... variable within SP and it may lead to bad execution plan. ... the first time I execute the SP the ... > no more than 50), using the index, and then do the clustered index seek ...
    (microsoft.public.sqlserver.programming)