Drop Table

Support Forum for database administrators and web based access to important newsgroups related to databases
Register on Database Support Forum Edit your profileCalendarFind other Database Support forum membersFrequently Asked QuestionsSearch this forum -> 
For Database admins: Free Database-related Magazines Now Free shipping to Texas


Post New Thread










Thread
Author

urgent
can any one give me a stored procedure which on execution creates an
excel file in one of my drives(like c:\temp.xls)that contains records
from a table selected which should be the argument of the stored
procedure.

Report this thread to moderator Post Follow-up to this message
Old Post
Kalyan
04-01-05 01:03 AM


Re: urgent
Although it might be possible to write that purely in TSQL (using the
sp_OA procs) you will probably find it much easier and more efficient
to use DTS and then run the DTS package from a stored proc. If you
aren't familiar with DTS, use the Import/Export Wizard to create a
package for you and then adapt it in the designer.

Alternatively, write an Excel macro to do the same thing. Excel can
connect directly to SQL via ODBC. Technically you could open an Excel
application object from an SP and run the macro that way (sp_OA_create
again). However, I wouldn't recommend doing that as part of a
production process on a server because it is hard to avoid leaking
resources and RAM to dormant instances of Excel if and when the process
ever fails.

--
David Portas
SQL Server MVP
--


Report this thread to moderator Post Follow-up to this message
Old Post
David Portas
04-01-05 01:03 AM


Sponsored Links





Last Thread Next Thread
Post New Thread

Microsoft SQL Server forum archive

Show a Printable Version Email This Page to Someone! Receive updates to this thread
Microsoft SQL Server
Access database support
PostgreSQL Replication
SQL Server ODBC
FoxPro Support
PostgreSQL pgAdmin
SQL Server Clustering
MySQL ODBC
Web Applications with dBASE
SQL Server CE
MySQL++
Sybase Database Support
MS SQL Full Text Search
PostgreSQL Administration
SQL Anywhere support
DB2 UDB Database
Paradox Database Support
Filemaker Database
Berkley DB
SQL 2000/2000i database
ASE Database
Forum Jump:
All times are GMT. The time now is 11:47 PM.

 
Mobile devices forum | Database support forum archive




Copyrights DropTable.com Database Support Forum 2004 - 2006