Blockchain is a technology that underpins the success of Bitcoin and other digital currencies, but it has uses far beyond finance. Learn how blockchain works and why it is proving disruptive to other areas of IT.
ALTER PROC [dbo].[InsertPhone] ( @EmployeeNo int , @PhoneNumber char(24) ) as begin declare @CONTEXT_INFO varchar(100) select @CONTEXT_INFO = COALESCE(CONVERT(VARCHAR(128), CONTEXT_INFO()), CURRENT_USER) UPDATE o SET o.employeeno = c.employeeno , o.PhoneNumber =c.PhoneNumber ,o.DateUpdated=getdate() , o.CreatedBy=@CONTEXT_INFO , O.UpdatedBy=@CONTEXT_INFOT FROM Phone o JOIN ADUser c ON c.EmployeeNo = o.EmployeeNo WHERE c.EmployeeNo = @EmployeeNo IF @@ROWCOUNT = 0 BEGIN INSERT INTO [Phone] ( employeeno , PhoneNumber , CreatedBy , UpdatedBy ) SELECT Ad.employeeno , Ad.PhoneNo , @CONTEXT_INFO , @CONTEXT_INFO FROM ADUser AD WHERE Ad.employeeno=@EmployeeNo END
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.