Hi,
Can anyone please point out what im doing wrong with this Stored Procedure please. I cant get it to compile and my software isnt giving any useful clues as to what is wrong with it.
CREATE PROCEDURE web.createSubscriptions
   (
   @Member_Id BIGINT,
   @Trans_type VARCHAR(100),
   @Payment_Status VARCHAR(100),
   @Payment_Date DATETIME,
   @Trans_Id VARCHAR(100)
   )
AS
DECLARE @tmpType VARCHAR(15)
BEGIN
INSERT INTO TBL_SUBSCRIPTIONS (subs_MemberID, subs_Type, subs_Status, subs_DateGenerated, subs_PaypalTransaction) VALUES(@Member_Id, @Trans_Type, @Payment_Status, @Payment_Date, @Trans_Id)
IF(@Trans_type = 'subscr_signup')
    BEGIN
    @tmpType = 'premium'
    END
ELSE(@Trans_type = 'subscr_cancel')
    BEGIN
    @tmpType = 'basic'
    END
UPDATE TBL_MEMBERS
SET members_Type = @tmpType
WHERE members_Id = @Member_Id
END