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 2005 Forums
 SSIS and Import/Export (2005)
 datatype

Author  Topic 

laddu
Constraint Violating Yak Guru

332 Posts

Posted - 2010-10-25 : 15:00:42
Hi,

I am trying to export data from Excel 2007 to SQL Server 2005.

excel data

Average,Standard Deviation,t_min_median,t_max_median
74.64%, 35.72% , 22:30:00 , 3:30:00


when import to sql table data is like below
0.746428571428571, 0.35722269960311, 1899-12-30 22:30:00.000, 1899-12-30 03:30:00.000

Please advice on datatypes? Is there any datatype for only time in SQL?

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-10-25 : 15:04:26
SQL Server 2005 doesn't support that through a time data type. You can use varchar though.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

laddu
Constraint Violating Yak Guru

332 Posts

Posted - 2010-10-25 : 15:36:44
Thank you for your reply.
what about %data columns datatype?
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-10-25 : 15:38:06
How do you want that data stored?

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

laddu
Constraint Violating Yak Guru

332 Posts

Posted - 2010-10-25 : 16:08:07
I want to store data as 74.64.

what type, precision, scale that I need to use
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-10-25 : 23:17:54
decimal(4,2)

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

rahuldhoble
Starting Member

3 Posts

Posted - 2010-10-26 : 01:32:47
Please let me know when you said
"when import to sql table data is like below
0.746428571428571, 0.35722269960311, 1899-12-30 22:30:00.000, 1899-12-30 03:30:00.000
"
what is the table stucture along with datatype of each column

Regards,
Rahul Dhoble
Sr.Software Engineer
Mumbai
Go to Top of Page
   

- Advertisement -