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 2005 Forums
 Transact-SQL (2005)
 Pull info from a table

Author  Topic 

servmgr2004
Starting Member

10 Posts

Posted - 2012-12-16 : 14:27:50
I have this query that pulls info from several other table. I want to be able to extract info from it to put in a reprt that prints as a txt file. this query pulls everything from the tables based on the query. Any ideas?


SELECT
*
FROM
#ShipLog l
LEFT JOIN [MASTER].[dbo].[Bank_Region] b ON b.[Bank_Region]+b.[Job_Type] = l.[Bank_Region]+l.[Job_Type]
LEFT JOIN [MASTER].[dbo].[Client_List] c ON c.[keyID] = b.[Client_keyId]
ORDER BY c.Client_ID

sunitabeck
Master Smack Fu Yak Hacker

5155 Posts

Posted - 2012-12-16 : 16:31:08
There are a number of ways to get data from SQL Server into a file.

The simplest and quickest perhaps is to use the Import/Export Wizard. To use it, right click on the database name in object explorer in SQL Server Management Studio, select Tasks -> Export Data and follow through the wizard. You can also save the steps as a package if you need to run it repeatedly.
Go to Top of Page
   

- Advertisement -