I did a search and read a few solutions but they just don't make too much sense to me. Forgive my newbie-ness but I'm still pretty new when it comes to stored procedures. I'm still learning every minute I working with SQL.
I have a big and somewhat complex stored procedure that returns a result set that I would like to just copy into a new table. I normally use the SELECT * INTO [table] FROM [table] statement but i don't know the proper syntax for a stored procedure.
I've fanthomed the idea of just copying the statements from the stored procedure, but this stored procedure is rather complex and I'm not too sure what to copy and what not to without reviewing the statements closely.
So, I was thinking:
SELECT * INTO TableA FROM (EXECUTE sp_List '0001','P','P') AS X
Of course this just errors out and probably not possible.
Thanks for any advice. I'm sure this is probably so easy...
If you keep doing the same thing, you'll always get the same thing...