Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Comparing
Message
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00523261
Message ID:
00523371
Vues:
16
>John,
>
>This is the idea I got from Al Doman quite recently (search "Comparing two arrays" thread):
>
>You can do it this way:
>pseudo-code
>
>lcUniqueTableName=sys(2015) && could not remeber this sys
>select FreeTable
>copy structure to (m.lcUniqueTableName)
>select (m.lcUniqueTableName)
>append from FreeTable
>append from DBCTable
>lcGroupBy=""
>lnFields=fcount()
>for i=1 to m.lnFields
>    lcGroupBy=m.lcGroupBy+field(m.i)+iif(m.i=m.lnFields,'',',')
>endif
>
>select *, count(*) as cntDups from (m.lcUniqueTableName) ;
>   group by &lcGroupBy ;
>   having cntDups>=2 ;
>   into cursor curDups
>
>select *, count(*) as cntUnique from (m.lcUniqueTableName) ;
>   group by &lcGroupBy ;
>   having cntUnique=1 ;
>   into cursor curUnique
>
>use in select(m.lcUniqueTableName)
>delete file (m.lcUniqueTableName+"*")
>
>

Nadya, that is the one I was thinking of, thanks!
John
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform