dbTalk Databases Forums  

Run SQL-Server Query in Excel

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss Run SQL-Server Query in Excel in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Maik Richter
 
Posts: n/a

Default Run SQL-Server Query in Excel - 07-26-2004 , 05:09 AM






Hi guys,

is there a way to run a SQL-query on a SQL-Server
within Excel?

(Is it possible to create any JOIN-querys and DATEDIFF-functions within
Excel-Microsoft Query?)

Thanks much guys,

Mike



Reply With Quote
  #2  
Old   
 
Posts: n/a

Default Run SQL-Server Query in Excel - 07-26-2004 , 10:36 AM






Yes, there are a few ways to do this.

The "wizard driven" way to do this is to use Excel's
database query. Select Data>>Import External Data>>New
Database Query (this selection may vary based on your
version of Excel). Work your way through the wizard to get
your data.

The other way to do this is via VBA. This is much more
powerful, but much more complicated. An example of its
power is that you can create new Excel Functions to pull
in a value based on values in another cell and it will
recalculate with all other cells.

HTH

Paul


Quote:
-----Original Message-----
Hi guys,

is there a way to run a SQL-query on a SQL-Server
within Excel?

(Is it possible to create any JOIN-querys and DATEDIFF-
functions within
Excel-Microsoft Query?)

Thanks much guys,

Mike


.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.