Hello everyone that can help me,
i am trying to create a stored procedure that uses a temporary table. I want to be able to Use a Select Into statement to populate information into a tempory table.
Then I want to run another Select Into statement to populate the same tempory table. Then view the results of that tempory table. It seems easy enough, through all of the books that I have on the subject, I am somewhat confused how to make it work in real life.
So far this is what I have:
Create Procedure dbo.usp_test AS
Select * from #temptable
Obviously it doesn't work. As you can probably see, my experience with Procedures is limited. Can anyone help me with this? please help.