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)
 DTS Package export from temporary table

Author  Topic 

mr_mist
Grunnio

1870 Posts

Posted - 2002-11-28 : 07:39:25
Hello

I have a piece of code that generates a temporary table in one step and then, in another step, selects data from this temporary table and performs operations on it. This seems to be the most efficient way of creating the result output I need, and works fine from Query Analyzer.

However I now want to export the results automatically to an excel sheet from a scheduled DTS package, but the temporary table is causing me a headache.

Essentially :

If I just have a single data transfer task that includes all the SQL for both steps then it will let me parse the SQL but I can not create the necessary transformations.

If I split the statement so that the first bit (that creates the temporary table) is in a SQL task and the second bit (that selects the output from the temporary table) is int he transform data task, then I imagine that I could create the necessary transformations but it wont let me, because it can't find the temporary table so won't parse the SQL.

There's only one connection involved. I'm not sure why I can't do this.

Any ideas, suggestions?

-------
Moo.

nr
SQLTeam MVY

12543 Posts

Posted - 2002-11-28 : 10:55:01
You can crate a premanent table with the same structure as the temp table and it will then let you crate the transformations.
At run time change the source to the temp table and if you really do only have one connection it will use that source for the transformations.

I've posted a few times how to change the souurce at run time.

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

mr_mist
Grunnio

1870 Posts

Posted - 2002-12-02 : 04:08:57
quote:

You can crate a premanent table with the same structure as the temp table and it will then let you crate the transformations.



This is indeed what I did in the end. Pesky thing.

-------
Moo.
Go to Top of Page
   

- Advertisement -