May 5, 2008 at 12:20 am
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.
[font="Arial"]Nothing is impossible with Hard Work[/font]:)
May 5, 2008 at 12:40 am
Hi
You can insert the result set of a procedures into a table.
Insert into table1 (col1,col2....)
Exec StoreProc1 @param1,@param2... .
"Keep Trying"
May 5, 2008 at 3:49 am
Dear Chirag,
Thanks a lot.
It is working now.
[font="Arial"]Nothing is impossible with Hard Work[/font]:)
May 6, 2008 at 3:19 am
Hi
Glad to help. 🙂
"Keep Trying"
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply