I'm trying to import a set of database (.DBF) to the MS SQL Server 2005. But I found the Datatype for the Time column is in char format. Is it possible to convert it to Time format when importing to MS SQL?
Also, if there is a way to convert to TIME formant, Can I combine it with the Date colume?
Not sure how you're doing the import, if you're using SSIS to import the data then there are ways to change the datatype on the fly during the ETL process (derived columns, expression language, Cast(SSIS), etc).
If you're using T/SQL to import the data then look at the CAST and CONVERT functions.
You could have something like CAST((date + ' ' + time) as datetime) if you want to combine.
No comments:
Post a Comment