dbTalk Databases Forums  

Datetime error when importing from csv

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Datetime error when importing from csv in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Jeff Borden
 
Posts: n/a

Default Datetime error when importing from csv - 08-04-2003 , 05:28 PM






I'm having troubles importing date fields from a csv.
I've tried a variety of ways, but to no avail. I keep
receiving errors to the effect of:

Number rows failing exceeds the max specified.
TransformCopy 'DTSTransformatoin_4' conversion error:
Conversion invalid for datatypes on column pair 1 (source
column 'Col004'(DBTYPE_STR), destination
column 'move_out_date' (DBTYPE_DBTIMESTAMP)).

When I leave the date fields in the csv blank, it has no
problem entering all of the rest of the fields and
leaving the date fields as NULL. I'm a NewB to DTS and
I've tried a variety of different ways of storing the
datetime in the csv. Such as:

'2003-04-31','2003-08-13'
or
"2003-04-31","2003-08-13"
or
2003-04-31,2003-08-13

and none have worked. Can someone point me in a
direction so I can get this fixed? Thank you.

Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Datetime error when importing from csv - 08-05-2003 , 01:20 AM






Have a look at this

Formatting Character Data into Datetime fields
http://www.sqldts.com/default.aspx?6,103,249,0,1

--

----------------------------
Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org



"Jeff Borden" <jeff_borden (AT) hotmail (DOT) com> wrote

Quote:
I'm having troubles importing date fields from a csv.
I've tried a variety of ways, but to no avail. I keep
receiving errors to the effect of:

Number rows failing exceeds the max specified.
TransformCopy 'DTSTransformatoin_4' conversion error:
Conversion invalid for datatypes on column pair 1 (source
column 'Col004'(DBTYPE_STR), destination
column 'move_out_date' (DBTYPE_DBTIMESTAMP)).

When I leave the date fields in the csv blank, it has no
problem entering all of the rest of the fields and
leaving the date fields as NULL. I'm a NewB to DTS and
I've tried a variety of different ways of storing the
datetime in the csv. Such as:

'2003-04-31','2003-08-13'
or
"2003-04-31","2003-08-13"
or
2003-04-31,2003-08-13

and none have worked. Can someone point me in a
direction so I can get this fixed? Thank you.



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.