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
 General SQL Server Forums
 New to SQL Server Programming
 SQL to Excel or Word

Author  Topic 

ishchopra
Starting Member

24 Posts

Posted - 2010-07-16 : 04:17:03
Hello Experts,

I have sales database and i want to generate commission statements out of it. All calculations have been done in SQL table its just exporting the data to a particular format (each record to one sheet)

this statements need to go out via email to every customer but i am not worried about sending emails. I am looking for some automatic generation of statements through SQL

is it possible or any workarounds ? let me know if this detail is not sufficient

sql-programmers
Posting Yak Master

190 Posts

Posted - 2010-07-16 : 04:47:33
You may use OPENROWSET concept to export excel files.

SQL Server Programmers and Consultants
http://www.sql-programmers.com/
Go to Top of Page

ishchopra
Starting Member

24 Posts

Posted - 2010-07-16 : 05:11:45
quote:
Originally posted by sql-programmers

You may use OPENROWSET concept to export excel files.

SQL Server Programmers and Consultants
http://www.sql-programmers.com/



How OPENROWSET can be used to export data from SQL to Excel in specific format.. can you please elaborate

thanks in advance
Go to Top of Page

sql-programmers
Posting Yak Master

190 Posts

Posted - 2010-07-16 : 06:02:07
Check the link,

http://www.databasejournal.com/features/mssql/article.php/3584751/OPENROWSET-function-in-SQL-Server-2005.htm

SQL Server Programmers and Consultants
http://www.sql-programmers.com/
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2010-07-16 : 11:21:21
Also refer http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=49926

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

jackv
Master Smack Fu Yak Hacker

2179 Posts

Posted - 2010-07-17 : 06:08:39
You could also consider looking at Powershell , which has some very easy to use funnctions , for storing records into Excel spreasheets .
there are many examples on msdn

Jack Vamvas
--------------------
http://www.sqlserver-dba.com
Go to Top of Page
   

- Advertisement -