>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)
>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