Tuesday, April 7, 2009

Microsoft Excel - Data access queries


Using a procedure in a microsoft data access query in excel.


Simple


  1. Create your procedure in sql server, grant execute permissions to the login that will be used from within excel.

  2. Open a blank workbook in excel - create your microsoft data access query (see previous blog of mine about how to set up and create a query)

  3. Instead using a select statement call your procedure for example:


  • execute burkularsamples.dbo.myproc

voila you are done.

Here is an example of code that uses a parameter

execute burkularsamples.dbo.myproc2 '2009-01-07 22:38:39.340'




No comments:

Post a Comment