JP-686566
SSC Enthusiast
Points: 150
More actions
November 19, 2008 at 4:56 pm
#196554
can i create a view from a temporary table and can i create a view inside a stored procedure
Thanks:)
JP
Ninja's_RGR'us
SSC Guru
Points: 294069
November 19, 2008 at 5:14 pm
#900796
Well yes and yes... but what the heck are you trying to accomplish?
Steve Jones - SSC Editor
Points: 736222
November 19, 2008 at 5:36 pm
#900804
Not recommended. The temp table will go away and the view will persist (And error out).
Why not a CTE?
November 19, 2008 at 6:04 pm
#900808
Thanks
November 20, 2008 at 5:19 am
#900984
Ahh, makes more sens. I was under the impression you wanted to build a script on a new db from a temp table you had just loaded...
otherwise, cte will do just fine (assuming the derived table option is off the table).
November 20, 2008 at 2:03 pm
#901285
ok thanks...
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply