Script for finding duplicate accounts and identifying dups

Peter Haworth pete at lcsql.com
Thu Nov 19 19:42:40 EST 2015


I haven't seen Bernd's code but here's one way.

repeat for each line rLine in tUserlist
   put item 2 of rLine & comma after tArray[item 1 of rLine]
end repeat

repeat for each line rKey in the keys of tArray
   if the number of items in tArray[rKey]>1 then
      put tArray[rKey] & return after tDupList
   end if
end repeat

Might have to upshift the array keys if case is a factor.


Pete
lcSQL Software <http://www.lcsql.com>
Home of lcStackBrowser <http://www.lcsql.com/lcstackbrowser.html> and
SQLiteAdmin <http://www.lcsql.com/sqliteadmin.html>

On Thu, Nov 19, 2015 at 12:12 PM, JOHN PATTEN <johnpatten at me.com> wrote:

> Hi All,
>
> I have a list of user accounts and unique IDs. The user accounts are first
> initial + last name. A typical list might look like the following:
>
> jdoe, 123456
> ggarcia, 121212
> ggarcia, 131313
>
> I’m trying identify the duplicates, list the username and their unique 6
> digit id.
>
> I have been using the following code that Bernd shared while ago:
> http://forums.livecode.com/viewtopic.php?f=9&t=6226#p28787 <
> http://forums.livecode.com/viewtopic.php?f=9&t=6226#p28787>
>
> …but it only works if i leave off my unique 6 digit IDs from my list of
> accounts, naturally.
>
> I would like to be able to identify the user accounts that are exact
> duplicates but then differentiate them by their unique 6 digit ID. So
> essentially, create a new list of just the duplicates and ids, i.e.
>
> ggarcia, 121212
> ggarcia, 131313
>
> Thanks in advance for any ideas!
>
> John Patten
> SUSD
>
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode



More information about the use-livecode mailing list