Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Exporting results of stored procedure

Status
Not open for further replies.

grnzbra

Programmer
Mar 12, 2002
1,273
US
I have a stored procedure:

SELECT...

which gives me what I want. Now my boss says "Send me a copy of the results". Is there any way to directly export it to something useful? I've tried to run it to a .txt, .rpt, and .xls files. The xls file puts everything in the first cell and nothing lines up, The txt and rpt files put in soft returns so that, again, nothing lines up. How can I get this out?
 
You can run it comma separated and save the results to a CSV file. Go into Tools->Options and in the Results tab select Comma Separated from the Results Output Format drop down.

Dan.
 
Use DTS and create a csv fiel that you can email to him whan its run (set up the bosses pc to open csv's in excel) and he will be really impressed - schedule the dts to run as often as new data is available.

create a dts with a sql connection and a text file set up a transform data task and paste your query in there - then do an on success to an email task that emails the file created to your boss - Bingo - you might just have a very prosperous New Year !

[bandito] [blue]DBomrrsm[/blue] [bandito]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top