Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2010
    Posts
    28

    Unanswered: Using Columns from a Stored Procedure

    Hi All

    How can I use certain column from my stored procedure? I have written the below code but doesnt work

    Code:
    SELECT * FROM exec spSalesPipeline @ConsultantName = 'Bob Smith'
    Any ideas?

    Thanks

  2. #2
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    You should really use a view or function instead of a sproc if you want to use one like this.

    Otherwise there are two work arounds I know of:
    1) Create a table that matches the output and insert in to that.
    2) Use OPENROWSET

    Both though are not preferred to correcting the design

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •