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
 Other SQL Server Topics (2005)
 How can i export results from sql query to excel

Author  Topic 

Pilot_Riaz
Starting Member

16 Posts

Posted - 2010-01-21 : 07:02:55
Hi,

I have many SQL Query e.g. below
select count(*) from Gameplay.dbo.AddCash where dayid in ('3655')
select count(*) from Gameplay.dbo.Alarms where dayid in ('3655')
select count(*) from Gameplay.dbo.AreaBetResults where dayid in ('3655')
select count(*) from Gameplay.dbo.BetResults where dayid in ('3655')

From the result of each query i would like to output into a column in Excel

I would have to run the query's again after i run a stored proc which backups and deletes all the tables in the DB and then restores the tables

The next time i run the query's i would like the results to appear in the 2nd column so i can verify the values are the same and spot where there are any differences.

How could i do this please?
I am using SQL Server 2005

Regards, Riaz




Riaz

RickD
Slow But Sure Yak Herding Master

3608 Posts

Posted - 2010-01-21 : 07:19:15
Amazing what you can find if you use the search or read the FAQs

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=55210

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=49926
Go to Top of Page
   

- Advertisement -