36 lines
2.1 KiB
SQL
36 lines
2.1 KiB
SQL
CREATE VIEW [C6Mart].[vRpClientiNonMigrati_20180112]
|
|
AS
|
|
--FC
|
|
--SELECT RETE, COD_FISCALE, ID_PROMOTORE
|
|
--FROM C6Mart.ANAG_CLIENTI
|
|
--WHERE (NOME IS NULL OR NOME = '') AND (COGNOME IS NULL OR COGNOME = '')
|
|
SELECT anag.RETE , anag.COD_FISCALE, anag.ID_PROMOTORE,contr.PIVA_FIDUCIARIA
|
|
FROM C6Mart.ANAG_CLIENTI anag
|
|
inner join c6mart.vcontratti contr
|
|
on contr.cod_fiscale=anag.cod_fiscale and contr.rete=anag.rete
|
|
WHERE 1=1 /* 20171110 */
|
|
and (NOME IS NULL OR NOME = '') AND (COGNOME IS NULL OR COGNOME = '')
|
|
and contr.rete+contr.cod_fiscale not in
|
|
(
|
|
/* 20171110
|
|
----'FGRBNLT65D44A859X' /* temp 20161207 */
|
|
----,'FPNDLCI41T49F205P' /* temp 20170317 */
|
|
----,'FNTRSFN60A29F205X' /* temp 20170413 causa erorre in wrapper console di AllineaPortafoglioClienti */
|
|
----,'FRMNSRN50B14G160L' /* temp 20170616 causa erorre in wrapper console di AllineaPortafoglioClienti - upd C6Mart.ANAG_CLIENTI */
|
|
----,'SBLDMRK89A43H501E' /* temp 20170705 causa erorre in wrapper console di AllineaPortafoglioClienti - upd C6Mart.ANAG_CLIENTI */
|
|
----,'SNVGMNL73A15H501Y'
|
|
----,'SMTANDR70P22H501S'
|
|
----,'SFLCNTN47B12F631K'
|
|
----,'SFF@10093'
|
|
----,'FCGODTL56P51G224V' /* temp 20170825 causa erorre in wrapper console di AllineaPortafoglioClienti - upd C6Mart.ANAG_CLIENTI */
|
|
----,'SSCTGZM53R41C351H' /* temp 20170919 causa erorre in wrapper console di AllineaPortafoglioClienti */
|
|
*/
|
|
/* ,'FFRNNCL87D25G224T' 20171110 nome+cognome aggiornato */
|
|
/* ,'FGLLFBA57R22F205P' temp 20170922 causa erorre in wrapper console di AllineaPortafoglioClienti
|
|
,'STZZFNC51B57D810T' /* temp 20171005 causa erorre in wrapper console di AllineaPortafoglioClienti */
|
|
,'SLVORSO76A65D711N' /* temp 20171107 causa erorre in wrapper console di AllineaPortafoglioClienti */
|
|
20171110 nome+cognome aggiornato */
|
|
'FFF@10105' /* temp 20171107 causa erorre in wrapper console di AllineaPortafoglioClienti */
|
|
/* 20171110 AllineaPortafoglioClienti non restiuisce record */
|
|
,'SGBRMCL56B15C390A' /* 20171110 AllineaPortafoglioClienti non restiuisce record */
|
|
) |