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)
 Create Table From Query

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2003-11-07 : 08:16:13
Manish writes "Hi,
I want to create a table from a result comes from query. My query is

Select C1.packname,C1.desc,C2.catname from Pack C1 Left Join Cat C2
ON C1.Catid = C2.Catid
Order by Catname

I want to create a table from the result and then export it to a excel file please help.

Thanks
With Ragards
Manish"

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2003-11-07 : 12:10:11
You could use SELECT INTO if you want to create a temporary table. You could also just use your query in a DTS package.

So go to the DTS designer, setup a two connections (one for SQL Server, the other for Excel), connect them with a transformation, double click on the transformation, then put your query in the first tab. You should be ready to export it after clicking ok.

Tara
Go to Top of Page
   

- Advertisement -