Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Comparing
Message
 
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00523261
Message ID:
00523371
Views:
15
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform