Logo Passei Direto
Buscar

AutomaticallyDeniedBackfill

User badge image

Enviado por Hackz Co. em

Esta é uma pré-visualização de arquivo. Entre para ver o arquivo original

-- PreVerifications about to be updated
SELECT * FROM producers.PreVerification PV
WHERE
	PV.PreVerificationStatusId <> 1
AND
	PV.ProducerId IN (
		23131978,
		40013879,
		58489520,
		66766969,
		1839972,
		37766511,
		87495798,
		97866821,
		97910751,
		97956997,
		97849971,
		97888042,
		97697243,
		33272335,
		97708275,
		42272708,
		80687683,
		97850118,
		81173839,
		97900682
);
-- Set "DenialReasonId" to NULL and update "PreVerificationStatusId" to 5 (Available for Review)
UPDATE producers.PreVerification PV
SET PV.DenialReasonId = NULL, PV.PreVerificationStatusId = 5
WHERE
	PV.PreVerificationStatusId <> 1
AND
	PV.ProducerId IN (
		23131978,
		40013879,
		58489520,
		66766969,
		1839972,
		37766511,
		87495798,
		97866821,
		97910751,
		97956997,
		97849971,
		97888042,
		97697243,
		33272335,
		97708275,
		42272708,
		80687683,
		97850118,
		81173839,
		97900682
);
-- Insert updated entries into PreVerificationUpdateLog table
INSERT INTO 
	producers.PreVerificationUpdateLog (
		UserId, 
 PDAppClientId, 
 UpdateDate,
 ProducerId, 
 IndicationCode, 
 PreVerificationStatusId, 
 DenialDescription, 
 DenialReasonId
	)
SELECT
	ProducerId AS UserId,
 8 AS PDAppClientId,
 UpdatedDate AS UpdateDate,
 ProducerId,
 IndicationCode,
 PreVerificationStatusId,
 DenialDescription,
 DenialReasonId
FROM producers.PreVerification
WHERE 
	PreVerificationStatusId <> 1
AND
	ProducerId IN (
		23131978,
		40013879,
		58489520,
		66766969,
		1839972,
		37766511,
		87495798,
		97866821,
		97910751,
		97956997,
		97849971,
		97888042,
		97697243,
		33272335,
		97708275,
		42272708,
		80687683,
		97850118,
		81173839,
		97900682
);

Teste o Premium para desbloquear

Aproveite todos os benefícios por 3 dias sem pagar! 😉
Já tem cadastro?