Microsoft Office Tutorials and References
In Depth Information
Passing Your Own SQL Statements to External Databases
Figure 18-14: Click the Properties button for the connection you want to change.
The Connection Properties dialog box opens. Here you can click the Definition tab (see Figure 18-15).
Change the Command Type property to SQL and then enter your SQL statement.
Figure 18-15: On the Definition tab, select the SQL command type and enter your SQL Statement.
Running stored procedures from Excel
If you’re connecting to an SQL Server database, you can use your own SQL Statement to fire a stored
procedure. The SQL Statement demonstrated in Figure 18-16 executes the SP_MarketSummary
Figure 18-16: Running an SQL Server stored procedure from Excel.