Select the table name on the left to see the associated Stored Procedure, created using SQLDatalayer. Notice in the screen image the Execution time of 0:0:1 (1) second to script 13 tables, scripting a total of 72 Stored procedures. Total lines of all the Stored Procedures: 1516 and a total of 3026 lines in the Class Objects. |
USE Northwind GO SET QUOTED_IDENTIFIER OFF GO SET ANSI_NULLS OFF GO --Select, Scripted using SQLDatalayer http://www.SQLDataLayer.com/ -- CREATE PROCEDURE [dbo].[fsp_GetCategories] AS SELECT [CategoryID], [CategoryName], [Description], [Picture] FROM [Categories] GO GRANT EXECUTE ON [dbo].[fsp_GetCategories] TO [guest] GO CREATE PROCEDURE [dbo].[fsp_GetCategories_CategoryID] @CategoryID int AS SELECT [CategoryID], [CategoryName], [Description], [Picture] FROM [Categories] WHERE [CategoryID]=@CategoryID GO GRANT EXECUTE ON [dbo].[fsp_GetCategories_CategoryID] TO [guest] GO --Insert, Scripted using SQLDatalayer http://www.SQLDataLayer.com/ -- CREATE PROCEDURE [dbo].[fsp_InsertCategories] @CategoryID int OUTPUT, @CategoryName nvarchar(15), @Description ntext = null, @Picture image = null AS INSERT INTO [dbo].[Categories] ([CategoryName], [Description], [Picture]) VALUES (@CategoryName, @Description, @Picture) SET @CategoryID=(SELECT IDENT_CURRENT('Categories')) GO GRANT EXECUTE ON [dbo].[fsp_InsertCategories] TO [guest] GO --Update, Scripted using SQLDatalayer http://www.SQLDataLayer.com/ -- CREATE PROCEDURE [dbo].[fsp_UpdateCategories_CategoryID] @CategoryID int, @CategoryName nvarchar(15), @Description ntext, @Picture image AS UPDATE [dbo].[Categories] SET [CategoryName]=@CategoryName, [Description]=@Description, [Picture]=@Picture WHERE [CategoryID]=@CategoryID GO GRANT EXECUTE ON [dbo].[fsp_UpdateCategories_CategoryID] TO [guest] GO --Delete, Scripted using SQLDatalayer http://www.SQLDataLayer.com/ -- CREATE PROCEDURE [dbo].[fsp_DeleteCategories_CategoryID] @CategoryID int AS DELETE FROM [Categories] WHERE [CategoryID]=@CategoryID GO GRANT EXECUTE ON [dbo].[fsp_DeleteCategories_CategoryID] TO [guest] GO SET QUOTED_IDENTIFIER OFF GO SET ANSI_NULLS ON GO |
USE Northwind GO SET QUOTED_IDENTIFIER OFF GO SET ANSI_NULLS OFF GO --Select, Scripted using SQLDatalayer http://www.SQLDataLayer.com/ -- CREATE PROCEDURE [dbo].[fsp_GetCustomerCustomerDemo] AS SELECT [CustomerID], [CustomerTypeID] FROM [CustomerCustomerDemo] GO GRANT EXECUTE ON [dbo].[fsp_GetCustomerCustomerDemo] TO [guest] GO CREATE PROCEDURE [dbo].[fsp_GetCustomerCustomerDemo_CustomerIDCustomerTypeID] @CustomerID Nchar(5), @CustomerTypeID Nchar(10) AS SELECT [CustomerID], [CustomerTypeID] FROM [CustomerCustomerDemo] WHERE [CustomerID]=@CustomerID AND [CustomerTypeID]=@CustomerTypeID GO GRANT EXECUTE ON [dbo].[fsp_GetCustomerCustomerDemo_CustomerIDCustomerTypeID] TO [guest] GO --Insert, Scripted using SQLDatalayer http://www.SQLDataLayer.com/ -- CREATE PROCEDURE [dbo].[fsp_InsertCustomerCustomerDemo] @CustomerID Nchar(5), @CustomerTypeID Nchar(10) AS INSERT INTO [dbo].[CustomerCustomerDemo] ([CustomerID], [CustomerTypeID]) VALUES (@CustomerID, @CustomerTypeID) GO GRANT EXECUTE ON [dbo].[fsp_InsertCustomerCustomerDemo] TO [guest] GO --Update, Scripted using SQLDatalayer http://www.SQLDataLayer.com/ -- CREATE PROCEDURE [dbo].[fsp_UpdateCustomerCustomerDemo_CustomerID_CustomerTypeID] @CustomerID Nchar(5), @CustomerTypeID Nchar(10) AS UPDATE [dbo].[CustomerCustomerDemo] SET [CustomerID]=@CustomerID, [CustomerTypeID]=@CustomerTypeID WHERE [CustomerID]=@CustomerID AND [CustomerTypeID]=@CustomerTypeID GO GRANT EXECUTE ON [dbo].[fsp_UpdateCustomerCustomerDemo_CustomerID_CustomerTypeID] TO [guest] GO --Delete, Scripted using SQLDatalayer http://www.SQLDataLayer.com/ -- CREATE PROCEDURE [dbo].[fsp_DeleteCustomerCustomerDemo_CustomerID_CustomerTypeID] @CustomerID Nchar(5), @CustomerTypeID Nchar(10) AS DELETE FROM [CustomerCustomerDemo] WHERE [CustomerID]=@CustomerID AND [CustomerTypeID]=@CustomerTypeID GO GRANT EXECUTE ON [dbo].[fsp_DeleteCustomerCustomerDemo_CustomerID_CustomerTypeID] TO [guest] GO SET QUOTED_IDENTIFIER OFF GO SET ANSI_NULLS ON GO |
USE Northwind GO SET QUOTED_IDENTIFIER OFF GO SET ANSI_NULLS OFF GO --Select, Scripted using SQLDatalayer http://www.SQLDataLayer.com/ -- CREATE PROCEDURE [dbo].[fsp_GetCustomerDemographics] AS SELECT [CustomerTypeID], [CustomerDesc] FROM [CustomerDemographics] GO GRANT EXECUTE ON [dbo].[fsp_GetCustomerDemographics] TO [guest] GO CREATE PROCEDURE [dbo].[fsp_GetCustomerDemographics_CustomerTypeID] @CustomerTypeID Nchar(10) AS SELECT [CustomerTypeID], [CustomerDesc] FROM [CustomerDemographics] WHERE [CustomerTypeID]=@CustomerTypeID GO GRANT EXECUTE ON [dbo].[fsp_GetCustomerDemographics_CustomerTypeID] TO [guest] GO --Insert, Scripted using SQLDatalayer http://www.SQLDataLayer.com/ -- CREATE PROCEDURE [dbo].[fsp_InsertCustomerDemographics] @CustomerTypeID Nchar(10), @CustomerDesc ntext = null AS INSERT INTO [dbo].[CustomerDemographics] ([CustomerTypeID], [CustomerDesc]) VALUES (@CustomerTypeID, @CustomerDesc) GO GRANT EXECUTE ON [dbo].[fsp_InsertCustomerDemographics] TO [guest] GO --Update, Scripted using SQLDatalayer http://www.SQLDataLayer.com/ -- CREATE PROCEDURE [dbo].[fsp_UpdateCustomerDemographics_CustomerTypeID] @CustomerTypeID Nchar(10), @CustomerDesc ntext AS UPDATE [dbo].[CustomerDemographics] SET [CustomerTypeID]=@CustomerTypeID, [CustomerDesc]=@CustomerDesc WHERE [CustomerTypeID]=@CustomerTypeID GO GRANT EXECUTE ON [dbo].[fsp_UpdateCustomerDemographics_CustomerTypeID] TO [guest] GO --Delete, Scripted using SQLDatalayer http://www.SQLDataLayer.com/ -- CREATE PROCEDURE [dbo].[fsp_DeleteCustomerDemographics_CustomerTypeID] @CustomerTypeID Nchar(10) AS DELETE FROM [CustomerDemographics] WHERE [CustomerTypeID]=@CustomerTypeID GO GRANT EXECUTE ON [dbo].[fsp_DeleteCustomerDemographics_CustomerTypeID] TO [guest] GO SET QUOTED_IDENTIFIER OFF GO SET ANSI_NULLS ON GO |
USE Northwind GO SET QUOTED_IDENTIFIER OFF GO SET ANSI_NULLS OFF GO --Select, Scripted using SQLDatalayer http://www.SQLDataLayer.com/ -- CREATE PROCEDURE [dbo].[fsp_GetCustomers] AS SELECT [CustomerID], [CompanyName], [ContactName], [ContactTitle], [Address], [City], [Region], [PostalCode], [Country], [Phone], [Fax] FROM [Customers] GO GRANT EXECUTE ON [dbo].[fsp_GetCustomers] TO [guest] GO CREATE PROCEDURE [dbo].[fsp_GetCustomers_CustomerID] @CustomerID Nchar(5) AS SELECT [CustomerID], [CompanyName], [ContactName], [ContactTitle], [Address], [City], [Region], [PostalCode], [Country], [Phone], [Fax] FROM [Customers] WHERE [CustomerID]=@CustomerID GO GRANT EXECUTE ON [dbo].[fsp_GetCustomers_CustomerID] TO [guest] GO --Insert, Scripted using SQLDatalayer http://www.SQLDataLayer.com/ -- CREATE PROCEDURE [dbo].[fsp_InsertCustomers] @CustomerID Nchar(5), @CompanyName nvarchar(40), @ContactName nvarchar(30) = null, @ContactTitle nvarchar(30) = null, @Address nvarchar(60) = null, @City nvarchar(15) = null, @Region nvarchar(15) = null, @PostalCode nvarchar(10) = null, @Country nvarchar(15) = null, @Phone nvarchar(24) = null, @Fax nvarchar(24) = null AS INSERT INTO [dbo].[Customers] ([CustomerID], [CompanyName], [ContactName], [ContactTitle], [Address], [City], [Region], [PostalCode], [Country], [Phone], [Fax]) VALUES (@CustomerID, @CompanyName, @ContactName, @ContactTitle, @Address, @City, @Region, @PostalCode, @Country, @Phone, @Fax) GO GRANT EXECUTE ON [dbo].[fsp_InsertCustomers] TO [guest] GO --Update, Scripted using SQLDatalayer http://www.SQLDataLayer.com/ -- CREATE PROCEDURE [dbo].[fsp_UpdateCustomers_CustomerID] @CustomerID Nchar(5), @CompanyName nvarchar(40), @ContactName nvarchar(30), @ContactTitle nvarchar(30), @Address nvarchar(60), @City nvarchar(15), @Region nvarchar(15), @PostalCode nvarchar(10), @Country nvarchar(15), @Phone nvarchar(24), @Fax nvarchar(24) AS UPDATE [dbo].[Customers] SET [CustomerID]=@CustomerID, [CompanyName]=@CompanyName, [ContactName]=@ContactName, [ContactTitle]=@ContactTitle, [Address]=@Address, [City]=@City, [Region]=@Region, [PostalCode]=@PostalCode, [Country]=@Country, [Phone]=@Phone, [Fax]=@Fax WHERE [CustomerID]=@CustomerID GO GRANT EXECUTE ON [dbo].[fsp_UpdateCustomers_CustomerID] TO [guest] GO --Delete, Scripted using SQLDatalayer http://www.SQLDataLayer.com/ -- CREATE PROCEDURE [dbo].[fsp_DeleteCustomers_CustomerID] @CustomerID Nchar(5) AS DELETE FROM [Customers] WHERE [CustomerID]=@CustomerID GO GRANT EXECUTE ON [dbo].[fsp_DeleteCustomers_CustomerID] TO [guest] GO SET QUOTED_IDENTIFIER OFF GO SET ANSI_NULLS ON GO |
USE Northwind GO SET QUOTED_IDENTIFIER OFF GO SET ANSI_NULLS OFF GO --Select, Scripted using SQLDatalayer http://www.SQLDataLayer.com/ -- CREATE PROCEDURE [dbo].[fsp_GetEmployees] AS SELECT [EmployeeID], [LastName], [FirstName], [Title], [TitleOfCourtesy], [BirthDate], [HireDate], [Address], [City], [Region], [PostalCode], [Country], [HomePhone], [Extension], [Photo], [Notes], [ReportsTo], [PhotoPath] FROM [Employees] GO GRANT EXECUTE ON [dbo].[fsp_GetEmployees] TO [guest] GO CREATE PROCEDURE [dbo].[fsp_GetEmployees_EmployeeID] @EmployeeID int AS SELECT [EmployeeID], [LastName], [FirstName], [Title], [TitleOfCourtesy], [BirthDate], [HireDate], [Address], [City], [Region], [PostalCode], [Country], [HomePhone], [Extension], [Photo], [Notes], [ReportsTo], [PhotoPath] FROM [Employees] WHERE [EmployeeID]=@EmployeeID GO GRANT EXECUTE ON [dbo].[fsp_GetEmployees_EmployeeID] TO [guest] GO CREATE PROCEDURE [dbo].[fsp_GetEmployees_ReportsTo] @ReportsTo int AS SELECT [EmployeeID], [LastName], [FirstName], [Title], [TitleOfCourtesy], [BirthDate], [HireDate], [Address], [City], [Region], [PostalCode], [Country], [HomePhone], [Extension], [Photo], [Notes], [ReportsTo], [PhotoPath] FROM [Employees] WHERE [ReportsTo]=@ReportsTo GO GRANT EXECUTE ON [dbo].[fsp_GetEmployees_ReportsTo] TO [guest] GO --Insert, Scripted using SQLDatalayer http://www.SQLDataLayer.com/ -- CREATE PROCEDURE [dbo].[fsp_InsertEmployees] @EmployeeID int OUTPUT, @LastName nvarchar(20), @FirstName nvarchar(10), @Title nvarchar(30) = null, @TitleOfCourtesy nvarchar(25) = null, @BirthDate datetime = null, @HireDate datetime = null, @Address nvarchar(60) = null, @City nvarchar(15) = null, @Region nvarchar(15) = null, @PostalCode nvarchar(10) = null, @Country nvarchar(15) = null, @HomePhone nvarchar(24) = null, @Extension nvarchar(4) = null, @Photo image = null, @Notes ntext = null, @ReportsTo int = null, @PhotoPath nvarchar(255) = null AS INSERT INTO [dbo].[Employees] ([LastName], [FirstName], [Title], [TitleOfCourtesy], [BirthDate], [HireDate], [Address], [City], [Region], [PostalCode], [Country], [HomePhone], [Extension], [Photo], [Notes], [ReportsTo], [PhotoPath]) VALUES (@LastName, @FirstName, @Title, @TitleOfCourtesy, @BirthDate, @HireDate, @Address, @City, @Region, @PostalCode, @Country, @HomePhone, @Extension, @Photo, @Notes, @ReportsTo, @PhotoPath) SET @EmployeeID=(SELECT IDENT_CURRENT('Employees')) GO GRANT EXECUTE ON [dbo].[fsp_InsertEmployees] TO [guest] GO --Update, Scripted using SQLDatalayer http://www.SQLDataLayer.com/ -- CREATE PROCEDURE [dbo].[fsp_UpdateEmployees_EmployeeID] @EmployeeID int, @LastName nvarchar(20), @FirstName nvarchar(10), @Title nvarchar(30), @TitleOfCourtesy nvarchar(25), @BirthDate datetime, @HireDate datetime, @Address nvarchar(60), @City nvarchar(15), @Region nvarchar(15), @PostalCode nvarchar(10), @Country nvarchar(15), @HomePhone nvarchar(24), @Extension nvarchar(4), @Photo image, @Notes ntext, @ReportsTo int, @PhotoPath nvarchar(255) AS UPDATE [dbo].[Employees] SET [LastName]=@LastName, [FirstName]=@FirstName, [Title]=@Title, [TitleOfCourtesy]=@TitleOfCourtesy, [BirthDate]=@BirthDate, [HireDate]=@HireDate, [Address]=@Address, [City]=@City, [Region]=@Region, [PostalCode]=@PostalCode, [Country]=@Country, [HomePhone]=@HomePhone, [Extension]=@Extension, [Photo]=@Photo, [Notes]=@Notes, [ReportsTo]=@ReportsTo, [PhotoPath]=@PhotoPath WHERE [EmployeeID]=@EmployeeID GO GRANT EXECUTE ON [dbo].[fsp_UpdateEmployees_EmployeeID] TO [guest] GO --Delete, Scripted using SQLDatalayer http://www.SQLDataLayer.com/ -- CREATE PROCEDURE [dbo].[fsp_DeleteEmployees_EmployeeID] @EmployeeID int AS DELETE FROM [Employees] WHERE [EmployeeID]=@EmployeeID GO GRANT EXECUTE ON [dbo].[fsp_DeleteEmployees_EmployeeID] TO [guest] GO SET QUOTED_IDENTIFIER OFF GO SET ANSI_NULLS ON GO |
USE Northwind GO SET QUOTED_IDENTIFIER OFF GO SET ANSI_NULLS OFF GO --Select, Scripted using SQLDatalayer http://www.SQLDataLayer.com/ -- CREATE PROCEDURE [dbo].[fsp_GetEmployeeTerritories] AS SELECT [EmployeeID], [TerritoryID] FROM [EmployeeTerritories] GO GRANT EXECUTE ON [dbo].[fsp_GetEmployeeTerritories] TO [guest] GO CREATE PROCEDURE [dbo].[fsp_GetEmployeeTerritories_EmployeeIDTerritoryID] @EmployeeID int, @TerritoryID nvarchar(20) AS SELECT [EmployeeID], [TerritoryID] FROM [EmployeeTerritories] WHERE [EmployeeID]=@EmployeeID AND [TerritoryID]=@TerritoryID GO GRANT EXECUTE ON [dbo].[fsp_GetEmployeeTerritories_EmployeeIDTerritoryID] TO [guest] GO --Insert, Scripted using SQLDatalayer http://www.SQLDataLayer.com/ -- CREATE PROCEDURE [dbo].[fsp_InsertEmployeeTerritories] @EmployeeID int, @TerritoryID nvarchar(20) AS INSERT INTO [dbo].[EmployeeTerritories] ([EmployeeID], [TerritoryID]) VALUES (@EmployeeID, @TerritoryID) GO GRANT EXECUTE ON [dbo].[fsp_InsertEmployeeTerritories] TO [guest] GO --Update, Scripted using SQLDatalayer http://www.SQLDataLayer.com/ -- CREATE PROCEDURE [dbo].[fsp_UpdateEmployeeTerritories_EmployeeID_TerritoryID] @EmployeeID int, @TerritoryID nvarchar(20) AS UPDATE [dbo].[EmployeeTerritories] SET [EmployeeID]=@EmployeeID, [TerritoryID]=@TerritoryID WHERE [EmployeeID]=@EmployeeID AND [TerritoryID]=@TerritoryID GO GRANT EXECUTE ON [dbo].[fsp_UpdateEmployeeTerritories_EmployeeID_TerritoryID] TO [guest] GO --Delete, Scripted using SQLDatalayer http://www.SQLDataLayer.com/ -- CREATE PROCEDURE [dbo].[fsp_DeleteEmployeeTerritories_EmployeeID_TerritoryID] @EmployeeID int, @TerritoryID nvarchar(20) AS DELETE FROM [EmployeeTerritories] WHERE [EmployeeID]=@EmployeeID AND [TerritoryID]=@TerritoryID GO GRANT EXECUTE ON [dbo].[fsp_DeleteEmployeeTerritories_EmployeeID_TerritoryID] TO [guest] GO SET QUOTED_IDENTIFIER OFF GO SET ANSI_NULLS ON GO |
USE Northwind GO SET QUOTED_IDENTIFIER OFF GO SET ANSI_NULLS OFF GO --Select, Scripted using SQLDatalayer http://www.SQLDataLayer.com/ -- CREATE PROCEDURE [dbo].[fsp_GetOrder Details] AS SELECT [OrderID], [ProductID], [UnitPrice], [Quantity], [Discount] FROM [Order Details] GO GRANT EXECUTE ON [dbo].[fsp_GetOrder Details] TO [guest] GO CREATE PROCEDURE [dbo].[fsp_GetOrder Details_OrderIDProductID] @OrderID int, @ProductID int AS SELECT [OrderID], [ProductID], [UnitPrice], [Quantity], [Discount] FROM [Order Details] WHERE [OrderID]=@OrderID AND [ProductID]=@ProductID GO GRANT EXECUTE ON [dbo].[fsp_GetOrder Details_OrderIDProductID] TO [guest] GO --Insert, Scripted using SQLDatalayer http://www.SQLDataLayer.com/ -- CREATE PROCEDURE [dbo].[fsp_InsertOrder Details] @OrderID int, @ProductID int, @UnitPrice money, @Quantity smallint, @Discount real AS INSERT INTO [dbo].[Order Details] ([OrderID], [ProductID], [UnitPrice], [Quantity], [Discount]) VALUES (@OrderID, @ProductID, @UnitPrice, @Quantity, @Discount) GO GRANT EXECUTE ON [dbo].[fsp_InsertOrder Details] TO [guest] GO --Update, Scripted using SQLDatalayer http://www.SQLDataLayer.com/ -- CREATE PROCEDURE [dbo].[fsp_UpdateOrder Details_OrderID_ProductID] @OrderID int, @ProductID int, @UnitPrice money, @Quantity smallint, @Discount real AS UPDATE [dbo].[Order Details] SET [OrderID]=@OrderID, [ProductID]=@ProductID, [UnitPrice]=@UnitPrice, [Quantity]=@Quantity, [Discount]=@Discount WHERE [OrderID]=@OrderID AND [ProductID]=@ProductID GO GRANT EXECUTE ON [dbo].[fsp_UpdateOrder Details_OrderID_ProductID] TO [guest] GO --Delete, Scripted using SQLDatalayer http://www.SQLDataLayer.com/ -- CREATE PROCEDURE [dbo].[fsp_DeleteOrder Details_OrderID_ProductID] @OrderID int, @ProductID int AS DELETE FROM [Order Details] WHERE [OrderID]=@OrderID AND [ProductID]=@ProductID GO GRANT EXECUTE ON [dbo].[fsp_DeleteOrder Details_OrderID_ProductID] TO [guest] GO SET QUOTED_IDENTIFIER OFF GO SET ANSI_NULLS ON GO |
USE Northwind GO SET QUOTED_IDENTIFIER OFF GO SET ANSI_NULLS OFF GO --Select, Scripted using SQLDatalayer http://www.SQLDataLayer.com/ -- CREATE PROCEDURE [dbo].[fsp_GetOrders] AS SELECT [OrderID], [CustomerID], [EmployeeID], [OrderDate], [RequiredDate], [ShippedDate], [ShipVia], [Freight], [ShipName], [ShipAddress], [ShipCity], [ShipRegion], [ShipPostalCode], [ShipCountry] FROM [Orders] GO GRANT EXECUTE ON [dbo].[fsp_GetOrders] TO [guest] GO CREATE PROCEDURE [dbo].[fsp_GetOrders_OrderID] @OrderID int AS SELECT [OrderID], [CustomerID], [EmployeeID], [OrderDate], [RequiredDate], [ShippedDate], [ShipVia], [Freight], [ShipName], [ShipAddress], [ShipCity], [ShipRegion], [ShipPostalCode], [ShipCountry] FROM [Orders] WHERE [OrderID]=@OrderID GO GRANT EXECUTE ON [dbo].[fsp_GetOrders_OrderID] TO [guest] GO CREATE PROCEDURE [dbo].[fsp_GetOrders_CustomerID] @CustomerID Nchar(5) AS SELECT [OrderID], [CustomerID], [EmployeeID], [OrderDate], [RequiredDate], [ShippedDate], [ShipVia], [Freight], [ShipName], [ShipAddress], [ShipCity], [ShipRegion], [ShipPostalCode], [ShipCountry] FROM [Orders] WHERE [CustomerID]=@CustomerID GO GRANT EXECUTE ON [dbo].[fsp_GetOrders_CustomerID] TO [guest] GO CREATE PROCEDURE [dbo].[fsp_GetOrders_EmployeeID] @EmployeeID int AS SELECT [OrderID], [CustomerID], [EmployeeID], [OrderDate], [RequiredDate], [ShippedDate], [ShipVia], [Freight], [ShipName], [ShipAddress], [ShipCity], [ShipRegion], [ShipPostalCode], [ShipCountry] FROM [Orders] WHERE [EmployeeID]=@EmployeeID GO GRANT EXECUTE ON [dbo].[fsp_GetOrders_EmployeeID] TO [guest] GO CREATE PROCEDURE [dbo].[fsp_GetOrders_ShipVia] @ShipVia int AS SELECT [OrderID], [CustomerID], [EmployeeID], [OrderDate], [RequiredDate], [ShippedDate], [ShipVia], [Freight], [ShipName], [ShipAddress], [ShipCity], [ShipRegion], [ShipPostalCode], [ShipCountry] FROM [Orders] WHERE [ShipVia]=@ShipVia GO GRANT EXECUTE ON [dbo].[fsp_GetOrders_ShipVia] TO [guest] GO --Insert, Scripted using SQLDatalayer http://www.SQLDataLayer.com/ -- CREATE PROCEDURE [dbo].[fsp_InsertOrders] @OrderID int OUTPUT, @CustomerID Nchar(5) = null, @EmployeeID int = null, @OrderDate datetime = null, @RequiredDate datetime = null, @ShippedDate datetime = null, @ShipVia int = null, @Freight money = null, @ShipName nvarchar(40) = null, @ShipAddress nvarchar(60) = null, @ShipCity nvarchar(15) = null, @ShipRegion nvarchar(15) = null, @ShipPostalCode nvarchar(10) = null, @ShipCountry nvarchar(15) = null AS INSERT INTO [dbo].[Orders] ([CustomerID], [EmployeeID], [OrderDate], [RequiredDate], [ShippedDate], [ShipVia], [Freight], [ShipName], [ShipAddress], [ShipCity], [ShipRegion], [ShipPostalCode], [ShipCountry]) VALUES (@CustomerID, @EmployeeID, @OrderDate, @RequiredDate, @ShippedDate, @ShipVia, @Freight, @ShipName, @ShipAddress, @ShipCity, @ShipRegion, @ShipPostalCode, @ShipCountry) SET @OrderID=(SELECT IDENT_CURRENT('Orders')) GO GRANT EXECUTE ON [dbo].[fsp_InsertOrders] TO [guest] GO --Update, Scripted using SQLDatalayer http://www.SQLDataLayer.com/ -- CREATE PROCEDURE [dbo].[fsp_UpdateOrders_OrderID] @OrderID int, @CustomerID Nchar(5), @EmployeeID int, @OrderDate datetime, @RequiredDate datetime, @ShippedDate datetime, @ShipVia int, @Freight money, @ShipName nvarchar(40), @ShipAddress nvarchar(60), @ShipCity nvarchar(15), @ShipRegion nvarchar(15), @ShipPostalCode nvarchar(10), @ShipCountry nvarchar(15) AS UPDATE [dbo].[Orders] SET [CustomerID]=@CustomerID, [EmployeeID]=@EmployeeID, [OrderDate]=@OrderDate, [RequiredDate]=@RequiredDate, [ShippedDate]=@ShippedDate, [ShipVia]=@ShipVia, [Freight]=@Freight, [ShipName]=@ShipName, [ShipAddress]=@ShipAddress, [ShipCity]=@ShipCity, [ShipRegion]=@ShipRegion, [ShipPostalCode]=@ShipPostalCode, [ShipCountry]=@ShipCountry WHERE [OrderID]=@OrderID GO GRANT EXECUTE ON [dbo].[fsp_UpdateOrders_OrderID] TO [guest] GO --Delete, Scripted using SQLDatalayer http://www.SQLDataLayer.com/ -- CREATE PROCEDURE [dbo].[fsp_DeleteOrders_OrderID] @OrderID int AS DELETE FROM [Orders] WHERE [OrderID]=@OrderID GO GRANT EXECUTE ON [dbo].[fsp_DeleteOrders_OrderID] TO [guest] GO SET QUOTED_IDENTIFIER OFF GO SET ANSI_NULLS ON GO |
USE Northwind GO SET QUOTED_IDENTIFIER OFF GO SET ANSI_NULLS OFF GO --Select, Scripted using SQLDatalayer http://www.SQLDataLayer.com/ -- CREATE PROCEDURE [dbo].[fsp_GetProducts] AS SELECT [ProductID], [ProductName], [SupplierID], [CategoryID], [QuantityPerUnit], [UnitPrice], [UnitsInStock], [UnitsOnOrder], [ReorderLevel], [Discontinued] FROM [Products] GO GRANT EXECUTE ON [dbo].[fsp_GetProducts] TO [guest] GO CREATE PROCEDURE [dbo].[fsp_GetProducts_ProductID] @ProductID int AS SELECT [ProductID], [ProductName], [SupplierID], [CategoryID], [QuantityPerUnit], [UnitPrice], [UnitsInStock], [UnitsOnOrder], [ReorderLevel], [Discontinued] FROM [Products] WHERE [ProductID]=@ProductID GO GRANT EXECUTE ON [dbo].[fsp_GetProducts_ProductID] TO [guest] GO CREATE PROCEDURE [dbo].[fsp_GetProducts_CategoryID] @CategoryID int AS SELECT [ProductID], [ProductName], [SupplierID], [CategoryID], [QuantityPerUnit], [UnitPrice], [UnitsInStock], [UnitsOnOrder], [ReorderLevel], [Discontinued] FROM [Products] WHERE [CategoryID]=@CategoryID GO GRANT EXECUTE ON [dbo].[fsp_GetProducts_CategoryID] TO [guest] GO CREATE PROCEDURE [dbo].[fsp_GetProducts_SupplierID] @SupplierID int AS SELECT [ProductID], [ProductName], [SupplierID], [CategoryID], [QuantityPerUnit], [UnitPrice], [UnitsInStock], [UnitsOnOrder], [ReorderLevel], [Discontinued] FROM [Products] WHERE [SupplierID]=@SupplierID GO GRANT EXECUTE ON [dbo].[fsp_GetProducts_SupplierID] TO [guest] GO --Insert, Scripted using SQLDatalayer http://www.SQLDataLayer.com/ -- CREATE PROCEDURE [dbo].[fsp_InsertProducts] @ProductID int OUTPUT, @ProductName nvarchar(40), @SupplierID int = null, @CategoryID int = null, @QuantityPerUnit nvarchar(20) = null, @UnitPrice money = null, @UnitsInStock smallint = null, @UnitsOnOrder smallint = null, @ReorderLevel smallint = null, @Discontinued bit AS INSERT INTO [dbo].[Products] ([ProductName], [SupplierID], [CategoryID], [QuantityPerUnit], [UnitPrice], [UnitsInStock], [UnitsOnOrder], [ReorderLevel], [Discontinued]) VALUES (@ProductName, @SupplierID, @CategoryID, @QuantityPerUnit, @UnitPrice, @UnitsInStock, @UnitsOnOrder, @ReorderLevel, @Discontinued) SET @ProductID=(SELECT IDENT_CURRENT('Products')) GO GRANT EXECUTE ON [dbo].[fsp_InsertProducts] TO [guest] GO --Update, Scripted using SQLDatalayer http://www.SQLDataLayer.com/ -- CREATE PROCEDURE [dbo].[fsp_UpdateProducts_ProductID] @ProductID int, @ProductName nvarchar(40), @SupplierID int, @CategoryID int, @QuantityPerUnit nvarchar(20), @UnitPrice money, @UnitsInStock smallint, @UnitsOnOrder smallint, @ReorderLevel smallint, @Discontinued bit AS UPDATE [dbo].[Products] SET [ProductName]=@ProductName, [SupplierID]=@SupplierID, [CategoryID]=@CategoryID, [QuantityPerUnit]=@QuantityPerUnit, [UnitPrice]=@UnitPrice, [UnitsInStock]=@UnitsInStock, [UnitsOnOrder]=@UnitsOnOrder, [ReorderLevel]=@ReorderLevel, [Discontinued]=@Discontinued WHERE [ProductID]=@ProductID GO GRANT EXECUTE ON [dbo].[fsp_UpdateProducts_ProductID] TO [guest] GO --Delete, Scripted using SQLDatalayer http://www.SQLDataLayer.com/ -- CREATE PROCEDURE [dbo].[fsp_DeleteProducts_ProductID] @ProductID int AS DELETE FROM [Products] WHERE [ProductID]=@ProductID GO GRANT EXECUTE ON [dbo].[fsp_DeleteProducts_ProductID] TO [guest] GO SET QUOTED_IDENTIFIER OFF GO SET ANSI_NULLS ON GO |
USE Northwind GO SET QUOTED_IDENTIFIER OFF GO SET ANSI_NULLS OFF GO --Select, Scripted using SQLDatalayer http://www.SQLDataLayer.com/ -- CREATE PROCEDURE [dbo].[fsp_GetRegion] AS SELECT [RegionID], [RegionDescription] FROM [Region] GO GRANT EXECUTE ON [dbo].[fsp_GetRegion] TO [guest] GO CREATE PROCEDURE [dbo].[fsp_GetRegion_RegionID] @RegionID int AS SELECT [RegionID], [RegionDescription] FROM [Region] WHERE [RegionID]=@RegionID GO GRANT EXECUTE ON [dbo].[fsp_GetRegion_RegionID] TO [guest] GO --Insert, Scripted using SQLDatalayer http://www.SQLDataLayer.com/ -- CREATE PROCEDURE [dbo].[fsp_InsertRegion] @RegionID int, @RegionDescription Nchar(50) AS INSERT INTO [dbo].[Region] ([RegionID], [RegionDescription]) VALUES (@RegionID, @RegionDescription) GO GRANT EXECUTE ON [dbo].[fsp_InsertRegion] TO [guest] GO --Update, Scripted using SQLDatalayer http://www.SQLDataLayer.com/ -- CREATE PROCEDURE [dbo].[fsp_UpdateRegion_RegionID] @RegionID int, @RegionDescription Nchar(50) AS UPDATE [dbo].[Region] SET [RegionID]=@RegionID, [RegionDescription]=@RegionDescription WHERE [RegionID]=@RegionID GO GRANT EXECUTE ON [dbo].[fsp_UpdateRegion_RegionID] TO [guest] GO --Delete, Scripted using SQLDatalayer http://www.SQLDataLayer.com/ -- CREATE PROCEDURE [dbo].[fsp_DeleteRegion_RegionID] @RegionID int AS DELETE FROM [Region] WHERE [RegionID]=@RegionID GO GRANT EXECUTE ON [dbo].[fsp_DeleteRegion_RegionID] TO [guest] GO SET QUOTED_IDENTIFIER OFF GO SET ANSI_NULLS ON GO |
USE Northwind GO SET QUOTED_IDENTIFIER OFF GO SET ANSI_NULLS OFF GO --Select, Scripted using SQLDatalayer http://www.SQLDataLayer.com/ -- CREATE PROCEDURE [dbo].[fsp_GetShippers] AS SELECT [ShipperID], [CompanyName], [Phone] FROM [Shippers] GO GRANT EXECUTE ON [dbo].[fsp_GetShippers] TO [guest] GO CREATE PROCEDURE [dbo].[fsp_GetShippers_ShipperID] @ShipperID int AS SELECT [ShipperID], [CompanyName], [Phone] FROM [Shippers] WHERE [ShipperID]=@ShipperID GO GRANT EXECUTE ON [dbo].[fsp_GetShippers_ShipperID] TO [guest] GO --Insert, Scripted using SQLDatalayer http://www.SQLDataLayer.com/ -- CREATE PROCEDURE [dbo].[fsp_InsertShippers] @ShipperID int OUTPUT, @CompanyName nvarchar(40), @Phone nvarchar(24) = null AS INSERT INTO [dbo].[Shippers] ([CompanyName], [Phone]) VALUES (@CompanyName, @Phone) SET @ShipperID=(SELECT IDENT_CURRENT('Shippers')) GO GRANT EXECUTE ON [dbo].[fsp_InsertShippers] TO [guest] GO --Update, Scripted using SQLDatalayer http://www.SQLDataLayer.com/ -- CREATE PROCEDURE [dbo].[fsp_UpdateShippers_ShipperID] @ShipperID int, @CompanyName nvarchar(40), @Phone nvarchar(24) AS UPDATE [dbo].[Shippers] SET [CompanyName]=@CompanyName, [Phone]=@Phone WHERE [ShipperID]=@ShipperID GO GRANT EXECUTE ON [dbo].[fsp_UpdateShippers_ShipperID] TO [guest] GO --Delete, Scripted using SQLDatalayer http://www.SQLDataLayer.com/ -- CREATE PROCEDURE [dbo].[fsp_DeleteShippers_ShipperID] @ShipperID int AS DELETE FROM [Shippers] WHERE [ShipperID]=@ShipperID GO GRANT EXECUTE ON [dbo].[fsp_DeleteShippers_ShipperID] TO [guest] GO SET QUOTED_IDENTIFIER OFF GO SET ANSI_NULLS ON GO |
USE Northwind GO SET QUOTED_IDENTIFIER OFF GO SET ANSI_NULLS OFF GO --Select, Scripted using SQLDatalayer http://www.SQLDataLayer.com/ -- CREATE PROCEDURE [dbo].[fsp_GetSuppliers] AS SELECT [SupplierID], [CompanyName], [ContactName], [ContactTitle], [Address], [City], [Region], [PostalCode], [Country], [Phone], [Fax], [HomePage] FROM [Suppliers] GO GRANT EXECUTE ON [dbo].[fsp_GetSuppliers] TO [guest] GO CREATE PROCEDURE [dbo].[fsp_GetSuppliers_SupplierID] @SupplierID int AS SELECT [SupplierID], [CompanyName], [ContactName], [ContactTitle], [Address], [City], [Region], [PostalCode], [Country], [Phone], [Fax], [HomePage] FROM [Suppliers] WHERE [SupplierID]=@SupplierID GO GRANT EXECUTE ON [dbo].[fsp_GetSuppliers_SupplierID] TO [guest] GO --Insert, Scripted using SQLDatalayer http://www.SQLDataLayer.com/ -- CREATE PROCEDURE [dbo].[fsp_InsertSuppliers] @SupplierID int OUTPUT, @CompanyName nvarchar(40), @ContactName nvarchar(30) = null, @ContactTitle nvarchar(30) = null, @Address nvarchar(60) = null, @City nvarchar(15) = null, @Region nvarchar(15) = null, @PostalCode nvarchar(10) = null, @Country nvarchar(15) = null, @Phone nvarchar(24) = null, @Fax nvarchar(24) = null, @HomePage ntext = null AS INSERT INTO [dbo].[Suppliers] ([CompanyName], [ContactName], [ContactTitle], [Address], [City], [Region], [PostalCode], [Country], [Phone], [Fax], [HomePage]) VALUES (@CompanyName, @ContactName, @ContactTitle, @Address, @City, @Region, @PostalCode, @Country, @Phone, @Fax, @HomePage) SET @SupplierID=(SELECT IDENT_CURRENT('Suppliers')) GO GRANT EXECUTE ON [dbo].[fsp_InsertSuppliers] TO [guest] GO --Update, Scripted using SQLDatalayer http://www.SQLDataLayer.com/ -- CREATE PROCEDURE [dbo].[fsp_UpdateSuppliers_SupplierID] @SupplierID int, @CompanyName nvarchar(40), @ContactName nvarchar(30), @ContactTitle nvarchar(30), @Address nvarchar(60), @City nvarchar(15), @Region nvarchar(15), @PostalCode nvarchar(10), @Country nvarchar(15), @Phone nvarchar(24), @Fax nvarchar(24), @HomePage ntext AS UPDATE [dbo].[Suppliers] SET [CompanyName]=@CompanyName, [ContactName]=@ContactName, [ContactTitle]=@ContactTitle, [Address]=@Address, [City]=@City, [Region]=@Region, [PostalCode]=@PostalCode, [Country]=@Country, [Phone]=@Phone, [Fax]=@Fax, [HomePage]=@HomePage WHERE [SupplierID]=@SupplierID GO GRANT EXECUTE ON [dbo].[fsp_UpdateSuppliers_SupplierID] TO [guest] GO --Delete, Scripted using SQLDatalayer http://www.SQLDataLayer.com/ -- CREATE PROCEDURE [dbo].[fsp_DeleteSuppliers_SupplierID] @SupplierID int AS DELETE FROM [Suppliers] WHERE [SupplierID]=@SupplierID GO GRANT EXECUTE ON [dbo].[fsp_DeleteSuppliers_SupplierID] TO [guest] GO SET QUOTED_IDENTIFIER OFF GO SET ANSI_NULLS ON GO |
USE Northwind GO SET QUOTED_IDENTIFIER OFF GO SET ANSI_NULLS OFF GO --Select, Scripted using SQLDatalayer http://www.SQLDataLayer.com/ -- CREATE PROCEDURE [dbo].[fsp_GetTerritories] AS SELECT [TerritoryID], [TerritoryDescription], [RegionID] FROM [Territories] GO GRANT EXECUTE ON [dbo].[fsp_GetTerritories] TO [guest] GO CREATE PROCEDURE [dbo].[fsp_GetTerritories_TerritoryID] @TerritoryID nvarchar(20) AS SELECT [TerritoryID], [TerritoryDescription], [RegionID] FROM [Territories] WHERE [TerritoryID]=@TerritoryID GO GRANT EXECUTE ON [dbo].[fsp_GetTerritories_TerritoryID] TO [guest] GO CREATE PROCEDURE [dbo].[fsp_GetTerritories_RegionID] @RegionID int AS SELECT [TerritoryID], [TerritoryDescription], [RegionID] FROM [Territories] WHERE [RegionID]=@RegionID GO GRANT EXECUTE ON [dbo].[fsp_GetTerritories_RegionID] TO [guest] GO --Insert, Scripted using SQLDatalayer http://www.SQLDataLayer.com/ -- CREATE PROCEDURE [dbo].[fsp_InsertTerritories] @TerritoryID nvarchar(20), @TerritoryDescription Nchar(50), @RegionID int AS INSERT INTO [dbo].[Territories] ([TerritoryID], [TerritoryDescription], [RegionID]) VALUES (@TerritoryID, @TerritoryDescription, @RegionID) GO GRANT EXECUTE ON [dbo].[fsp_InsertTerritories] TO [guest] GO --Update, Scripted using SQLDatalayer http://www.SQLDataLayer.com/ -- CREATE PROCEDURE [dbo].[fsp_UpdateTerritories_TerritoryID] @TerritoryID nvarchar(20), @TerritoryDescription Nchar(50), @RegionID int AS UPDATE [dbo].[Territories] SET [TerritoryID]=@TerritoryID, [TerritoryDescription]=@TerritoryDescription, [RegionID]=@RegionID WHERE [TerritoryID]=@TerritoryID GO GRANT EXECUTE ON [dbo].[fsp_UpdateTerritories_TerritoryID] TO [guest] GO --Delete, Scripted using SQLDatalayer http://www.SQLDataLayer.com/ -- CREATE PROCEDURE [dbo].[fsp_DeleteTerritories_TerritoryID] @TerritoryID nvarchar(20) AS DELETE FROM [Territories] WHERE [TerritoryID]=@TerritoryID GO GRANT EXECUTE ON [dbo].[fsp_DeleteTerritories_TerritoryID] TO [guest] GO SET QUOTED_IDENTIFIER OFF GO SET ANSI_NULLS ON GO |