|
|
|
SSC Eights!
      
Group: General Forum Members
Last Login: Monday, June 21, 2010 5:29 AM
Points: 920,
Visits: 470
|
|
Dear All,
I have an store procedure which will return the file type rights of the user with one column "FileTypeID" with multiple rows.
Now i have an another requirement in another stored procedure which will have to take that "FileTypeID" and based on that it has to retrieve the documents in the DB.
For this I need to know how to assign the output of the stored procedure to "IN" clause.
For e.g., SELECT * FROM Docs WHERE FileTypeID IN ([file types to which the user has the rights which is retrieved from the previous stored procedure]
Can any one help in this regard?
Thanks a lot in advance.
Nothing is impossible with Hard Work:)
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Wednesday, April 24, 2013 5:02 AM
Points: 2,365,
Visits: 1,825
|
|
Hi
You can insert the result set of a procedures into a table.
Insert into table1 (col1,col2....) Exec StoreProc1 @param1,@param2... .
"Keep Trying"
|
|
|
|
|
SSC Eights!
      
Group: General Forum Members
Last Login: Monday, June 21, 2010 5:29 AM
Points: 920,
Visits: 470
|
|
Dear Chirag,
Thanks a lot.
It is working now.
Nothing is impossible with Hard Work:)
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Wednesday, April 24, 2013 5:02 AM
Points: 2,365,
Visits: 1,825
|
|
Hi
Glad to help. :)
"Keep Trying"
|
|
|
|