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.
Author |
Topic |
arkiboys
Master Smack Fu Yak Hacker
1433 Posts |
Posted - 2007-09-25 : 12:03:32
|
The following is a SAMPLE data from an excel spreadsheet. This SAMPLE data has many other fields as date. Here I have only used two date columns i.e. 28 Dec 2006 and 29 Dec 2006This data needs to be exported into sql server 2005 table which has the fields below where I have placed the data into a table.How can this be done please?data:Ref Sector Name 28 Dec 2006 29 Dec 2006 1 Sovereign RUSSIA 05 null 173.21 2 Sovereign RUSSIA 07 102.99 102.22 3 Sovereign RUSSIA 10 114.33 104.63 4 Sovereign RUSSIA 18 115.50 145.50 ... sql server tablecreate table tblData(DataID int,Ref int,Sector varchar(20),Name varchar(20),Date datetime,value decimal(6,2))DataID Ref Sector Name Date value1 1 Sovereign RUSSIA 05 28 Dec 2006 null2 1 Sovereign RUSSIA 05 29 Dec 2006 173.213 2 Sovereign RUSSIA 07 28 Dec 2006 102.994 2 Sovereign RUSSIA 07 29 Dec 2006 102.225 3 Sovereign RUSSIA 10 28 Dec 2006 114.336 3 Sovereign RUSSIA 10 29 Dec 2006 104.637 4 Sovereign RUSSIA 18 28 Dec 2006 115.508 4 Sovereign RUSSIA 18 29 Dec 2006 145.50... |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
|
|
|
|