27 lines
1.5 KiB
SQL
27 lines
1.5 KiB
SQL
CREATE VIEW [C6Mart].[vRpClientiNonMigrati_20171106]
|
|
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 (NOME IS NULL OR NOME = '') AND (COGNOME IS NULL OR COGNOME = '')
|
|
and contr.rete+contr.cod_fiscale not in
|
|
('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 */
|
|
,'FFRNNCL87D25G224T'
|
|
,'SSCTGZM53R41C351H' /* temp 20170919 causa erorre in wrapper console di AllineaPortafoglioClienti */
|
|
,'FGLLFBA57R22F205P' /* temp 20170922 causa erorre in wrapper console di AllineaPortafoglioClienti */
|
|
,'STZZFNC51B57D810T' /* temp 20171005 causa erorre in wrapper console di AllineaPortafoglioClienti */
|
|
) |