Unix Technical Forum

Problem in loading data from Excel

This is a discussion on Problem in loading data from Excel within the SQL Server Data Warehousing forums, part of the Microsoft SQL Server category; --> Hi, I am building a DTS package in Sql Server 2000. Data source is an excel file and destination ...


Go Back   Unix Technical Forum > Database Server Software > Microsoft SQL Server > SQL Server Data Warehousing

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-27-2008, 07:05 PM
rahulcheeku@gmail.com
 
Posts: n/a
Default Problem in loading data from Excel

Hi,
I am building a DTS package in Sql Server 2000. Data source is an
excel file and destination is Sql Server 2000. This package runs
monthly and loads the data into database. But evey month the number
of
columns in the source excel change. Now i am trying to get the number
of columns from the excel dynamically (Used range) and then load all
those columns in the database. But i am facing problem in
transforming
data dynamically from one excel column to one database column. Can
anybody please tell me if there is any way by which i can dynamically
make transfomations of a Transformation Task depending upon the
number
of columns present in the excel?

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-27-2008, 07:05 PM
TheSQLGuru
 
Posts: n/a
Default Re: Problem in loading data from Excel

How about VBScript and ADO, which has providers for both excel and sql
server? Gonna be a bit complicated since you will have to evaluate the
excel spreadsheet, determine how many columns and their names, script a
create table statement from this, then import the data.

Another method is to build a staging table and import that uses WAY more
columns than you ever think you will have in excel. Then do the import,
with NULL values going into any column that doesn't have data in excel.

I am a bit confused as to how useful the data can be if the number of
COLUMNS changes each month. :-)

--
TheSQLGuru
President
Indicium Resources, Inc.

<rahulcheeku@gmail.com> wrote in message
news:1177364704.682071.287360@l77g2000hsb.googlegr oups.com...
> Hi,
> I am building a DTS package in Sql Server 2000. Data source is an
> excel file and destination is Sql Server 2000. This package runs
> monthly and loads the data into database. But evey month the number
> of
> columns in the source excel change. Now i am trying to get the number
> of columns from the excel dynamically (Used range) and then load all
> those columns in the database. But i am facing problem in
> transforming
> data dynamically from one excel column to one database column. Can
> anybody please tell me if there is any way by which i can dynamically
> make transfomations of a Transformation Task depending upon the
> number
> of columns present in the excel?
>



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 11:02 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com