/* 0001_PEDTMP_ATUALIZA_RAMOATIV.SQL */
ALTER TABLE ATIVCLIENTE
ADD CDARVATIVCLI VARCHAR(20)
GO
ALTER TABLE ATIVCLIENTE
ADD CDNVATIVCLI VARCHAR(1)
GO
ALTER TABLE PARAMGERAL
ADD CDPICTATIVCL VARCHAR(20)
GO
BEGIN TRANSACTION
UPDATE ATIVCLIENTE
SET CDARVATIVCLI = CDATIVCLI,
    CDNVATIVCLI  = '1'
WHERE CDARVATIVCLI IS NULL
GO
UPDATE PARAMGERAL
SET CDPICTATIVCL = '99999'
WHERE CDPICTATIVCL IS NULL
GO