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 2000 Forums
 Import/Export (DTS) and Replication (2000)
 Urgent DTS load - Column heading Problem

Author  Topic 

css_jay99
Starting Member

9 Posts

Posted - 2006-04-04 : 13:08:01

Hi all,


I am new to sql server (like 1 week old) but my core experience lies in oracle.

I am about to load some data for a client into sql server from excell files

column wise, it contains one or two columns which are headed as dates (eg 2004, 2005 , 2006 YTD)

Now the column headings will change as years goes by (e.g next year they will be 2005, 2006, 2007 YTD)
Rows under these headings contain figures not dates
However the column positions will possibly not change

I will be using DTS

my is are

1) I need to be able to load data from the spreadsheet into sql server which I can do.
But I also need to be able check the column heading and then insert the date part

so assume spreadsheet is like

id-----revenue2004------revenue2005-----revenue2006YTD
1---------100--------------200-------------------10
2---------300--------------120-------------------33
3---------222--------------44--------------------0


so for instance I want to load the 1st two columns into a sqlserver and at the same time use the year heading
(by picking just the year part as a value for the column

So my sql server staging table with 3 rows will then look like this

id ---------- revenue--------- date
1--------------100-------------2004
2--------------300-------------2004
3--------------222-------------2004

Could this be done ?



Just a bigup on the DTS stuff, it is absolutely brilliant. compared to default oracle loader by oracle, it is like
comparing a skateboard to a Porche.


Thanks very much !

css_jay99
   

- Advertisement -