Monday, April 23, 2007

Data Transformation Services -- SQL Server

Today I used Data Transformation Services (DTS) of SQL Server 2000 to populate a table in the SQl Server database from an excel file. This was an easy way of creating a table on the fly without bothering to create the table structure first and then populate the table with the data.


Procedure I followed was as follows:

Right click on a table or a database in the SQL Server Enterprise manager.
select Import data
Select the source as an Excel driver
select the destination as the table to be created inthe database.
Click finish and your table is ready with the data populated

Yes, it is that simple.

No comments:

INSERT EXEC failed because the stored procedure altered the schema of the target table.

This morning I was trying to call a stored procedure and insert the results in a temp table using the following code  -- create table #...