Site Sponsored By: SQLDSC - SQL Server Desired State Configuration
Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
there is already a stored procedure in my db that returns the results i need to "filter" another query im writing...can i simply join on that sp?--exampleselectE.BadgeCodefrom tblEmployee e with (nolock)INNER JOIN spReportParameter_DS as ds with (nolock)on E.BadgeCode = DS.BadgeCode
visakh16
Very Important crosS Applying yaK Herder
52326 Posts
Posted - 2009-04-17 : 14:50:35
nope. you need to first put results of sp to temporary table and then join onto that.
INSERT #TempEXEC spReportParameter_DS ....selectE.BadgeCodefrom tblEmployee e with (nolock)INNER JOIN #Temp as ds with (nolock)on E.BadgeCode = DS.BadgeCode