View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
JimP JimP is offline
external usenet poster
 
Posts: 11
Default Joining SQL Server Stored Procedure to SQL Server Table

Is this possible? e.g.

This code executes a stored procedure with one argument for "Customer Type"
EXECUTE dbo.mysp.spname @cust_type = 'A'

1. How can I store the value for Customer Type in a cell to update the sp at
runtime?

2. How can I link the sp to another SQL Server table (e.g. to get Customer
name?) e.g.
SELECT n.cust_name FROM dbo.cust_names as n
JOIN (the stored procedure as s) ON s.cust_id = n.cust_id

3. How do I execute this?