Posted on: 10/15/2013 6:04:25 PM | Views : 683

I have a stored procedure that I want to register a user and record payment information.  I have sp_Register that registers a user and auto-increments a new userid.  In the same stored procedure, I need to auto-increment a new payment id and write the new userid into the payment table.  Here is what I have so far:
 
Alter Procedure dbo.sp_Register ( @name varchar(100), @address varchar(120), @city varchar(100), @state varchar(2), @zip varchar(9), @memberid varchar(50), @password varchar(50), @payor varchar(100), @number varchar(20), @expmonth varchar(2), @expyear varchar(4), @scode varchar(3) ) As begin declare @newuserid int declare @newpaymentid int ...

Go to the complete details ...