Andrey
Andrey

Reputation: 1759

loading 20 procedures on SQL Server

I have SQL Server 2008 Express and I need to load 20 procedures. I have them in text file if I simply copy them and try to run in SQL Server Management Studio it throws me error that it cannot read them, when I insert them one by one it load perfectly. So I was wondering if there is way to load all of them in one statement some thing like pack? I know in Oracle it is possible to use package how about SQL Server?

Upvotes: 0

Views: 53

Answers (1)

RandomUs1r
RandomUs1r

Reputation: 4190

You need to put

GO

at the end of each stored procedure like...

create stored procedure test1
AS
BEGIN
END
GO
create stored procedure test2
AS 
BEGIN
END
GO

To clarify this is syntax specific to SSMS.

Upvotes: 4

Related Questions