I have the following code in one of my Sql (2008) Stored Procs which executes perfectly fine:
CREATE PROCEDURE [dbo].[Item_AddItem] @CustomerId u
you can do this:
SELECT CustomerId, FirstName, LastName, Email INTO #tempCustomer FROM Customer WHERE CustomerId = @CustomerId
then later
SELECT CustomerId FROM #tempCustomer
you doesn't need to declare the structure of #tempCustomer