Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Delete duplicate records
Message
De
27/11/2006 10:35:55
 
 
À
27/11/2006 09:47:53
Metin Emre
Ozcom Bilgisayar Ltd.
Istanbul, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01172620
Message ID:
01172671
Vues:
13
Metin

Wouldn't it be best to set the order to the index Tariq had?

Then (assuming always 3 of each or just 1), something like:
SCAN
  llFound       = .F.
  lnRecNo       = RECNO()
  xdate         = date
  xvoucher      = voucher
  xtype         = type
  xSeekKey      = DTOC( date) + str( voucher) + Type  && NOTE not ALLTRIM( Type) when used in key.
  Do while llFound
    If INDEXSEEK( xSeekKey, .T., "ThisTable", "TariqsIndex")
        Delete
        llFound = .T.
        Goto lnRecNo                                  && Don't even think this necessary
    Endif
  EndDO
EndSCAN
>Okey than,
>
>
>set dele on
>set orde to 0
>scan
>   xdate=date
>   xvoucher=voucher
>   xtype=type
>   xrec=recno()
>   loca for date=xdate and voucher=xvoucher and type=xtype and recno()#xrec
>   if foun()
>      conti
>      if foun()
>         dele
>      endif
>   endif
>   go xrec
>endscan
>
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform