SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


RE:


Author
Message
Samuel Vella
Samuel Vella
SSC Eights!
SSC Eights! (813 reputation)SSC Eights! (813 reputation)SSC Eights! (813 reputation)SSC Eights! (813 reputation)SSC Eights! (813 reputation)SSC Eights! (813 reputation)SSC Eights! (813 reputation)SSC Eights! (813 reputation)

Group: General Forum Members
Points: 813 Visits: 2144
Not exactly Query Analysers best kept secret - more Excels super ability to absorb data in an expected manner from numerous sources including the clipboard.

As someone who has spent 5 years having to produce bespoke Excel reports from both Oracle and SQL Server databases, heres my advanced tips:

1.
Excel can have the microsoft query engine installed with it, go to:
Data -> Get external data -> New database query

You may be prompted to click OK to install the correct components. Now you will need to set up the database connection but this will be saved for future queries.

If you save the spreadsheet the query is also saved so the data can be refreshed at the click of a button.

2.
If your database is web enabled then with some practice you can dump the output into a HTML table and use excel to pick it up - I personally use XML and the IIS XML support (watch out for security issues here!!).
Data -> Get external data -> New web query

3.
If your system produces ASP then then you *should* be able to generate an Excel spreadsheet on the fly... The user may just have to click a link and the browser will open Excel for them.

I've NOT done this with SQL Server myself, however I did get it working with the web services on Oracle 8i.

4.
Super advanced method, using VBA you can write your own query editor with excel which will then nicely format the result. The data can be collected using either the web query or a database connection, which ever method you choose it can be scripted with VBA.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search