ERP postgres ile SQL arasında linked server üzerinden sorgu -------------------------------------------------------------------------------- SELECT ISNULL( N.CurrAccCode, 'NEBIMDE YOK' ), ISNULL( E.NBM_CurrAccCode, 'ERP de YOK' ) FROM OPENQUERY( POSTGRESQL, 'SELECT "NBM_CurrAccCode" FROM "ERP"."BusinessPartnerDetail" ' ) E RIGHT JOIN cdCurrAcc N ON N.CurrAccCode COLLATE SQL_Latin1_General_CP1_CI_AS = E.NBM_CurrAccCode WHERE E.NBM_CurrAccCode IS NULL OR E.NBM_CurrAccCode = ' '
ERP DE OLUP NEBİMDE OLMAYAN SORGULAR ------------------------------------------------------------------------------ SELECT ISNULL( N.CurrAccCode, 'Nebimde Yok' ), ISNULL( E.NBM_CurrAccCode, 'ERP de YOK' ) FROM OPENQUERY( POSTGRESQL, 'SELECT "NBM_CurrAccCode" FROM "ERP"."BusinessPartnerDetail" WHERE "NBM_CurrAccCode" IS NOT NULL' ) E LEFT JOIN cdCurrAcc N ON N.CurrAccCode COLLATE SQL_Latin1_General_CP1_CI_AS = E.NBM_CurrAccCode WHERE N.CurrAccCode IS NULL OR N.CurrAccCode = ' ' İSTERSEN BUNLARI
UNION ALL DA YAPABİLİRİSİN O ZAMAN TÜM KAYITLARI AYNI ANDA ÇEKEBİLİRSİN -------------------------------------------------------------------------------- SELECT ISNULL( N.CurrAccCode, 'NEBIMDE YOK' ), ISNULL( E.NBM_CurrAccCode, 'ERP de YOK' ) FROM OPENQUERY( POSTGRESQL, 'SELECT "NBM_CurrAccCode" FROM "ERP"."BusinessPartnerDetail" ' ) E RIGHT JOIN cdCurrAcc N ON N.CurrAccCode COLLATE SQL_Latin1_General_CP1_CI_AS = E.NBM_CurrAccCode WHERE E.NBM_CurrAccCode IS NULL OR E.NBM_CurrAccCode = ' ' UNION ALL SELECT ISNULL( N.CurrAccCode, 'Nebimde Yok' ), ISNULL( E.NBM_CurrAccCode, 'ERP de YOK' ) FROM OPENQUERY( POSTGRESQL, 'SELECT "NBM_CurrAccCode" FROM "ERP"."BusinessPartnerDetail" WHERE "NBM_CurrAccCode" IS NOT NULL' ) E LEFT JOIN cdCurrAcc N ON N.CurrAccCode COLLATE SQL_Latin1_General_CP1_CI_AS = E.NBM_CurrAccCode WHERE N.CurrAccCode IS NULL OR N.CurrAccCode = ' '