SQL Server import - Data Overflow. Invalid character value for cast specification

Error occurs when using SQL Server's Data Transformation Import Wizard to import data from Access and you have dates outside the following range: 1/1/1900 and 6/6/2079

Just run the query below on the offending table, and change the resulting dates to something like #1/1/2004 01:01:00 AM" (this depends on your column's date format)

Query:

SELECT TABLE_NAME.DATE_COLUMN_NAME
FROM TABLE_NAME
WHERE (TABLE_NAME.DATE_COLUMN_NAME) Not Between #1/1/1900# And #6/6/2079#;

thanks to attached page..

No comments:

Post a Comment