DEFINITIONS

Definitions More Info.
Definition ID332
TitleSQL
CategorySCRIPT
DefinitionID FARKLI OLUP DUBLICATE RECORD KAYIT SILME
Definition Description--Ayni tabloda ID si farklı olup diger tum alanlari ayni olan kayitlari elemek ici /* Ayni tablonun aliasini olusturup ,sayet unique index varsa, unique olmasi gereken alanlari eslestirip, k.ID>b.ID ID si buyuk olan kayitlari silersin. */ select K.ID,k.ESC22AU_BANK, k.ESC22AU_ACQISS, k.ESC22AU_PAN, k.ESC22AU_MTYPE, k.ESC22AU_DATIME, k.ESC22AU_ACQID, k.ESC22AU_TERMID, k.ESC22AU_RETREF, k.ESC22AU_STAN from [FraudDB].[dbo].[tblAutLog_dublicate_201306280023] K INNER JOIN [FraudDB].[dbo].[tblAutLog_dublicate_201306280023] B ON K.ID>B.ID AND K.[ESC22AU_BANK]=B.[ESC22AU_BANK] AND K.[ESC22AU_ACQISS]=B.[ESC22AU_ACQISS] AND K.[ESC22AU_PAN]=B.[ESC22AU_PAN] AND K.[ESC22AU_MTYPE]=B.[ESC22AU_MTYPE] AND K.[ESC22AU_ACQID]=B.[ESC22AU_ACQID] AND K.[ESC22AU_TERMID]=B.[ESC22AU_TERMID] AND K.[ESC22AU_RETREF]=B.[ESC22AU_RETREF] AND K.[ESC22AU_STAN]=B.[ESC22AU_STAN] and K.ESC22AU_PAN='21890D523958C294' ORDER BY K.ID
RecordBycunay
Record Date28-06-2013 18:26:51
Düzenle
Kopyala
Sil