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
 General SQL Server Forums
 New to SQL Server Programming
 Date\Time defaults

Author  Topic 

chris_cs
Posting Yak Master

223 Posts

Posted - 2007-01-17 : 08:03:15
I'm having some problems when trying to import an external table into my SQL Server 7.0 DB. When date fields are being created the datatype is being set to smalldatetime which is causing errors because some of the data in the source table is using dates proir to 1900.

Is there a way I can set the datatype to be set as datetime instead of smalldatetime?

mwjdavidson
Aged Yak Warrior

735 Posts

Posted - 2007-01-17 : 08:35:51
How are you importing this?

Mark
Go to Top of Page

chris_cs
Posting Yak Master

223 Posts

Posted - 2007-01-17 : 10:47:00
Through an other ODBC data source.
Go to Top of Page

elwoos
Master Smack Fu Yak Hacker

2052 Posts

Posted - 2007-01-18 : 03:49:13
Do you mean with the Import data wizard? If so you can change it from within there. When you get to the Select Source Tables and Views part there is a transform button, click on that to change the destination table properties.

Alternatively, you can save the whole thing as a SQL Server DTS package without running it and then modify the package.

I suggest you also look up BCP in BOL for future use


steve

-----------

Don't worry head. The computer will do all the thinking from now on.
Go to Top of Page

chris_cs
Posting Yak Master

223 Posts

Posted - 2007-01-18 : 06:51:50
Oh I see. I can;t believe I missed that!

Thanks for the help
Go to Top of Page
   

- Advertisement -