Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Table Import fails - Can't figure out why?

Status
Not open for further replies.

Griffyn

Programmer
Jul 11, 2002
1,077
AU
Hi all,

Using SQL Server 2000 and trying to import about 200 tables from an ODBC source. A number of them consistently fail because for some reason the source tables have a DATE field and one or two records amongst hundreds of thousands have only 2 digits for the year instead of 4.

I've tried writing some VB Script to detect this and automatically convert to 4 digits on the fly as part of a DTS package, but I can't get it to work.

Can somebody help?

Thanks.
 
A quick work around would be to create the 200 table schemas first, tweak the failing timedate columns to VarChars, then run your import again. Afterwards, fix the dates that have the 2 digit year and then convert the VarChar field(s) back to a DateTime. Just and idea!

Thanks

J. Kusch
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top