Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 Data overflow - invalid character value

Author  Topic 

Zath
Constraint Violating Yak Guru

298 Posts

Posted - 2007-03-13 : 16:39:23
I'm importing data from Access 2000 to sql server 2000.

An error comes up that really shouldn't be there.

Hopefully someone can shed a little light on it:

Error at Destination for Row number 290.
Errors encountered so far in this task:1.
Insert error, column 26 ('ReviiewedOn',DBTYPE_DBTIMESTAMP),
status6: Data overflow.
Invalid character value for cast specification.


column 26 is an Access Date/Time data type and sql made it a
smalldatetime data type.

So, not to be beaten, I changed the sql table data type to varchar
and it imported ok.

But, I try to change it back to datetime and get this error:

'CalibrationReview' table
- Unable to modify table.
ODBC error: [Microsoft][ODBC SQL Server Driver][SQL Server]Arithmetic overflow error converting expression to data type datetime.
[Microsoft][ODBC SQL Server Driver][SQL Server]The statement has been terminated.

There is another column with datetime and it imported ok.

What can I look for that is not easily seen?

Thanks,

Zath


SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-03-14 : 02:24:43
You have invalid data in the column you try to convert to date.
SQL smalldatetime can only accept dates between January 1, 1900 to June 6, 2079.


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

Zath
Constraint Violating Yak Guru

298 Posts

Posted - 2007-03-14 : 10:29:15
Well, you were right. There was 1 invalid date in the column I didn't see.

A long list, no wonder I missed it.

But I don't understand is why MS Access acepted it.

It was something like 1/6/227.

I guess access' date range is larger?


Zath
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-03-14 : 10:55:43
Look in the help file.


Peter Larsson
Helsingborg, Sweden
Go to Top of Page
   

- Advertisement -