-- -- 26763 - add tbl_Control value.sql -- USE Airtrak GO begin DECLARE @PK_ControlNo INT DECLARE @ControlDesc VARCHAR(255) DECLARE @ControlValue VARCHAR(2000) DECLARE @Obsolete CHAR(1) SET @PK_ControlNo = 2373 SET @ControlDesc = 'Picked Up Status Code' SET @ControlValue = '' SET @Obsolete = 'N' IF EXISTS (SELECT PK_ControlNo FROM tbl_Control WHERE PK_ControlNo = @PK_ControlNo) UPDATE tbl_Control SET ControlDesc = @ControlDesc, ControlValue = @ControlValue, Memo = 'default is blank', Obsolete = @Obsolete WHERE PK_ControlNo = @PK_ControlNo ELSE INSERT INTO tbl_Control (PK_ControlNo, ControlDesc, ControlValue, Memo, Obsolete) VALUES (@PK_ControlNo, @ControlDesc, @ControlValue, 'default is blank', @Obsolete); END GO