Execute a stored procedure in a SELECT or FROM statement or a SQL function
I would look at these two additional posts at stackoverflow:  https://stackoverflow.com/questions/14506871/how-to-execute-a-stored-procedure-inside-a-select-query https://stackoverflow.com/questions/209383/select-columns-from-result-set-of-stored-procedure    As aasim.abdullah has said, I would look into Table valued functions more too.  Information about them can be found here:  https://technet.microsoft.com/en-us/library/ms191165(v=sql.105).aspx    I know the Microsoft link refers to SQL Server 2008 R2, the theory is the same though.