Stored Procedures

Last Post 10 Sep 2007 08:40 AM by GoodFella3993. 1 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
GoodFella3993
New Member
New Member

--
10 Sep 2007 06:29 AM
I have a script that creates a report. It is a series of about 10 select statements all compiled in a text file. I simply open it up and run it in query analyzer.

The select statements create #Temp tables and then then next select statement will use that newly created #Temp table.

Basic EX:
SELECT *
INTO #TEMP1
FROM CUSTOMER

GO

SELECT TOP 100
FROM #TEMP1

When I run something like this in query analyzer, I need to include the word 'GO' so that the prior statements finish running before they are used. I am now trying to make this script a stored procedure but am getting errors from the 'GO' statements.

Any thoughts ....
GoodFella3993
New Member
New Member

--
10 Sep 2007 08:40 AM
Great! Thats exactly what I was looking for.
You are not authorized to post a reply.

Acceptable Use Policy