Use Atlantic;
GO
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'usp_Rebuild_Orders_Table') AND type = 'P')
DROP PROCEDURE dbo.usp_Rebuild_Orders_Table;
GO
CREATE PROCEDURE usp_Rebuild_Orders_Table @nbr_rows INT
AS
EXEC usp_Drop_Table_Orders
EXEC usp_Create_Table_Orders
EXEC usp_Insert_Into_Orders_Table @nbr_rows
EXEC usp_Update_Orders_Sell_Price
GO
EXEC usp_Rebuild_Orders_Table 500;