Bulk Insert - How to represent nulls in .txt input file?

From: Sean (none)
Date: 08/25/04


Date: Wed, 25 Aug 2004 12:12:22 -0400

I have a table that I'm loading via .txt file input.

One of the columns has a datatype of datetime. It does allow nulls
which I've checked by simply adding 1 record via enterprise manager
with no value in the field.

When I execute the DTS package, I get "conversion error: Conversion
invalid for datatypes on ...."

This is a comma delimited file with Quotes (") surrounding the values.

I've tried no values ,"",

Blank ," ",

/N ,"/N"

<NULL> ,"<NULL>"

and all of them give me the same conversion error. I'm about to give
up and just pass some bogus date off in the future but there must be a
way to pass a null to a datetime field that allows nulls.

Any help for this newbie appreciated.



Relevant Pages

  • Re: Bulk Insert - How to represent nulls in .txt input file?
    ... >One of the columns has a datatype of datetime. ... >way to pass a null to a datetime field that allows nulls. ... I just tried,, (no quotes) and that worked. ...
    (microsoft.public.sqlserver.dts)
  • Re: To bit or not to bit...
    ... Apart from the stupidity of choosing the name "bit" for a datatype, SQL ... Do you find a reasonable way to get around NULLs? ... any other t-SQL datatypes – one might find this illogical but so does all ...
    (microsoft.public.sqlserver.programming)
  • Re: Input Mask on Date for Year or Month Only
    ... If you wish to use the DateTime functions, then the field's datatype ... format, the stored value must contain the day as well. ... mm-yyyy format, i.e. 08/2008 or 08-2008. ...
    (microsoft.public.access.gettingstarted)
  • Re: Datatype conversions from SQL to Access
    ... way data type. ... Just uncheck Allow Nulls so it is 2 way. ... > a datatype in SQL that will convert to Yes/No in Access. ...
    (microsoft.public.access.externaldata)
  • Re: Converting and formatting DATE field
    ... SQLServer does not have a date only datatype, therefore it will store a time ... If you don't specify the time portion when the datetime is inserted ... > I would like to be able to format this date and show only ...
    (microsoft.public.sqlserver.programming)