|
From: Doogie on 24 Jul 2008 10:29 Hi, I'd like to write sql code that takes the results of some queries and dump them into excel. I'm told you can use bcp to do that...but I also want to format the results - all without leaving sql. So for example I'd like to make the column headers bold, etc. I'm told bcp probably can't do that. Is there a way to do this all within Sql?
From: Russell on 24 Jul 2008 11:11 I had to do this previously. From what I can remember, I had an excel file that had the headings in it bolded etc. Part of the script would copy this from a template folder and then the query would be run to put the results into it. Regards Russell "Doogie" wrote: > Hi, > I'd like to write sql code that takes the results of some queries and > dump them into excel. I'm told you can use bcp to do that...but I > also want to format the results - all without leaving sql. So for > example I'd like to make the column headers bold, etc. I'm told bcp > probably can't do that. Is there a way to do this all within Sql? >
From: Mariano Gomez on 24 Jul 2008 11:38 You will need to use OPENQUERY to accomplish this -- of course, if SSIS is not an option. Visit http://www.simple-talk.com/sql/t-sql-programming/sql-server-excel-workbench/ for a great deal of info on how to use it with Jet databases. As for formatting, you are probably better off creating a macro in your spreadsheet that does all this for you. Best regards, -- MG.- Mariano Gomez, MIS, MCP, PMP Maximum Global Business, LLC http://www.maximumglobalbusiness.com "Doogie" wrote: > Hi, > I'd like to write sql code that takes the results of some queries and > dump them into excel. I'm told you can use bcp to do that...but I > also want to format the results - all without leaving sql. So for > example I'd like to make the column headers bold, etc. I'm told bcp > probably can't do that. Is there a way to do this all within Sql? >
From: Madhivanan on 28 Jul 2008 06:26 On Jul 24, 7:29 pm, Doogie <dnlwh...(a)dtgnet.com> wrote: > Hi, > I'd like to write sql code that takes the results of some queries and > dump them into excel. I'm told you can use bcp to do that...but I > also want to format the results - all without leaving sql. So for > example I'd like to make the column headers bold, etc. I'm told bcp > probably can't do that. Is there a way to do this all within Sql? Also refer http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=49926
|
Pages: 1 Prev: Question about views Next: Store Procedure to copy certain data to another DB |