Tuesday, January 17, 2012

CREATE PROMO CODE

CREATE PROCEDURE [TestingSP].[prc_PromoCode_INSERT_New]
@chrRoleID CHAR(2),
@intQuantity INT,
@dtsValidUpTo SMALLDATETIME
AS
/*
** 02/12/2010 modifyr
*/
DECLARE @count int

BEGIN
SET NOCOUNT ON;
DECLARE @Eid INT
set @count=0
-- while loop for insert quantity
WHILE @count<@intQuantity
BEGIN
INSERT INTO Testing.PromoCodes(RID,PcCodeValidUpto) VALUES (@chrRoleID,@dtsValidUpTo)
SET @count = @count+1
END
return 1
END
GO

No comments: