create procedure getConsumerID @outvar char(9) OUTPUT as declare @ConsumerID int begin transaction select @ConsumerID = fnPartID from tblParticipantNo if @ConsumerID is null begin set @ConsumerID = 1 insert into tblParticipantNo values(@ConsumerID) end else begin update tblParticipantNo set fnPartID=@ConsumerID + 1 end Select @ConsumerID set @outvar=@ConsumerID commit transaction
|Using Select Top (Select From )||5||469|
|What art the pros and cons of having a database language based on an industry accepted standard?||3||1,134|
|Cluster Resource error||3||53|
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
20 Experts available now in Live!