I have a similar problem; extracting data from an AS400. Where dates should
be null if there is nothing to store, by default it's recording '0001-01-01'.
When my DTS sees this, it fails. I tried creating an ActiveX/VBScript,
however it still doesn't seem to be working. Any suggestions on how to check
for valid dates and copying them over, otherwise populate as NULL?
Copy of DTS CODE
'**********************************************************************
' Visual Basic Transformation Script
' Copy each source column to the
' destination column
'************************************************************************
Function Main()
dim c_PPDCDT
DTSDestination("DOCTYP") = DTSSource("DOCTYP")
DTSDestination("DOCNBR") = DTSSource("DOCNBR")
'================================================
c_PPDCDT = DTSSource("PPDCDT")
IF IsDate(c_PPDCDT) = 1 THEN DTSDestination("PPDCDT") = DTSSource("PPDCDT")
ELSE DTSDestination("PPDCDT") = NULL
'================================================
Main = DTSTransformStat_OK
End Function
Thanks,
Michael
[quoted text, click to view] "Allan Mitchell" wrote:
> Hello DONNA,
>
>
> There are date ranges for data types and they are listed here. Chances are
> you are outside of the range
>
>
http://doc.ddart.net/mssql/sql70/da-db_9.htm >
> Allan Mitchell
>
www.SQLDTS.com >
www.SQLIS.com >
www.Konesans.com >
> > Receiveing the following message:
> >
> > Error Description: The number of failing rows exceeds the maximum
> > specified. Insert error, column 7 ('PERIOD_END', DBTYPE_DBTIMESTAMP),
> > status 6: Data overflow. Invalid character value for cast
> > specification.
> >
> > The DTS package this error was received on does nothing more than
> > extract a file from a UniData database into Sequel. The file contains
> > dates and amounts.
> >
> > Does sequel not allow importing a date greater than a certain date?
> >
>
>