Hi All
Iam trying to update a column called resource using a stored procedure if and only if the column has a null value in it.
Else it should not update the column.
Getting errors with the below SP.What am i doing wrong below?
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
ALTER PROCEDURE [dbo].[StepTwo_DBupdates]
(
@RQID int=null,
@RDID int=null,
@TAT int = null)
AS
UPDATE REPORTSELECTION
SET tat = @TAT,
Resource = COALESCE(NULLIF(Resource,NULL),(Select RI.resource from ReportInfo RI WHERE (reqid = @RQID) AND (rdesc = @RDID) )