dbTalk Databases Forums  

Date conversion errrors.

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


Discuss Date conversion errrors. in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Lam Nguyen
 
Posts: n/a

Default Date conversion errrors. - 08-04-2005 , 01:07 PM






Hi all,

I have the following file and I use DTS to import data into this table but I
am keep getting errors because of the date format in the file. This file is
2 Gb of data and the table has 230 columns. Does anyone has similar problem
and has a solution for it. Also, this table is copy into other tables in DTS
process. Any suggestions would greatly appreciate.

Save text file: HuonData
001143235,20010118,500
007814761,20011026,250
006408670,20040313,900

IF OBJECT_ID('HuonClaim', 'u') IS NOT NULL
DROP TABLE HuonClaim
go
CREATE TABLE HuonClaim
(
HuonPolNo CHAR(10) NULL,
PolEffDate CHAR(10) NULL,
PolDeduct money NULL
)
go


Reply With Quote
  #2  
Old   
Peter A. Schott
 
Posts: n/a

Default Re: Date conversion errrors. - 08-04-2005 , 03:09 PM






Perhaps transform the date column separately using either an ActiveX transform
to convert it to a date or default/NULL value if not a date? You could also
use the datetime transform for that column. I've had pretty good luck with
that.

-Pete

"Lam Nguyen" <LamNguyen (AT) discussions (DOT) microsoft.com> wrote:

Quote:
Hi all,

I have the following file and I use DTS to import data into this table but I
am keep getting errors because of the date format in the file. This file is
2 Gb of data and the table has 230 columns. Does anyone has similar problem
and has a solution for it. Also, this table is copy into other tables in DTS
process. Any suggestions would greatly appreciate.

Save text file: HuonData
001143235,20010118,500
007814761,20011026,250
006408670,20040313,900

IF OBJECT_ID('HuonClaim', 'u') IS NOT NULL
DROP TABLE HuonClaim
go
CREATE TABLE HuonClaim
(
HuonPolNo CHAR(10) NULL,
PolEffDate CHAR(10) NULL,
PolDeduct money NULL
)
go


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

Default Re: Date conversion errrors. - 08-04-2005 , 03:31 PM



This article may help

Formatting Character Data into Datetime fields
(http://www.sqldts.com/default.aspx?249)

--



Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.SQLIS.com - You thought DTS was good. here we show you the new stuff.
www.konesans.com - Consultancy from the people who know


"Lam Nguyen" <LamNguyen (AT) discussions (DOT) microsoft.com> wrote

Quote:
Hi all,

I have the following file and I use DTS to import data into this table but
I
am keep getting errors because of the date format in the file. This file
is
2 Gb of data and the table has 230 columns. Does anyone has similar
problem
and has a solution for it. Also, this table is copy into other tables in
DTS
process. Any suggestions would greatly appreciate.

Save text file: HuonData
001143235,20010118,500
007814761,20011026,250
006408670,20040313,900

IF OBJECT_ID('HuonClaim', 'u') IS NOT NULL
DROP TABLE HuonClaim
go
CREATE TABLE HuonClaim
(
HuonPolNo CHAR(10) NULL,
PolEffDate CHAR(10) NULL,
PolDeduct money NULL
)
go




Reply With Quote
  #4  
Old   
Lam Nguyen
 
Posts: n/a

Default Re: Date conversion errrors. - 08-05-2005 , 01:17 PM



Allan,

Thank you very much for pointing me to obtain the information. It working
O.K now.

L

"Allan Mitchell" wrote:

Quote:
This article may help

Formatting Character Data into Datetime fields
(http://www.sqldts.com/default.aspx?249)

--



Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.SQLIS.com - You thought DTS was good. here we show you the new stuff.
www.konesans.com - Consultancy from the people who know


"Lam Nguyen" <LamNguyen (AT) discussions (DOT) microsoft.com> wrote in message
news:1F0E15A6-E43A-47CE-9C42-80BDE0607E40 (AT) microsoft (DOT) com...
Hi all,

I have the following file and I use DTS to import data into this table but
I
am keep getting errors because of the date format in the file. This file
is
2 Gb of data and the table has 230 columns. Does anyone has similar
problem
and has a solution for it. Also, this table is copy into other tables in
DTS
process. Any suggestions would greatly appreciate.

Save text file: HuonData
001143235,20010118,500
007814761,20011026,250
006408670,20040313,900

IF OBJECT_ID('HuonClaim', 'u') IS NOT NULL
DROP TABLE HuonClaim
go
CREATE TABLE HuonClaim
(
HuonPolNo CHAR(10) NULL,
PolEffDate CHAR(10) NULL,
PolDeduct money NULL
)
go





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.