While the primary focus of this book is on using Access and Excel together to enable automation of reporting and analysis, it is difficult to ignore enterprise databases since in many cases they are the source data in a corporate setting. You don't need to know all about SQL Server to use it with Excel and Access. While you can read a SQL Server book if you need detail, this chapter introduces you to accessing data with tables, views, and stored procedures , accessing data through ADO, using temporary tables, and pushing and pulling data from SQL Server. As an additional topic, if you are familiar with Access, you know that crosstab queries are a very popular way to summarize data, so you may be surprised to find out that in SQL Server you cannot use them. I show how to build a stored procedure to get around this limitation, potentially simplifying your analysis of the data in Excel or Access substantially. Finally, I also cover using DTS to automate report production on a schedule.
Stored procedures are similar to procedures that you create in any programming language. They may take input parameters, execute code, return values, or call other procedures. You gain a performance advantage when using a stored procedure versus running a query with parameters. In addition, using a stored procedure reduces network traffic, since a single statement can call a stored procedure instead of sending multiple (sometimes hundreds of) lines of code over the network.