How can you search for duplicated items?

MasterQ

LOMCN Veteran
Veteran
Loyal Member
Aug 6, 2006
462
0
62
London
Hi,

Is there any software to search for duplicated texts? or a SQL Query command?

Thanks.
 

Kaori

LOMCN MiR3 Queen!
VIP
Jun 3, 2004
3,584
38
285
Canada
Hi,

Is there any software to search for duplicated texts? or a SQL Query command?

Thanks.



this is to find dup items in TBL_ITEM table
SELECT DISTINCT i1.* FROM TBL_ITEM i1, TBL_ITEM i2
WHERE i1.FLD_MAKEINDEX=i2.FLD_MAKEINDEX
AND i1.FLD_CHARACTER<>i2.FLD_CHARACTER
ORDER BY i1.FLD_MAKEINDEX
 

MasterQ

LOMCN Veteran
Veteran
Loyal Member
Aug 6, 2006
462
0
62
London
Thanks, worked :D

Now, there are a few dupped items but how do i check what they are? At first thought it was FLD_INDEX but thats wrong.
 

MasterQ

LOMCN Veteran
Veteran
Loyal Member
Aug 6, 2006
462
0
62
London
Thanks alot :)

They were all just torchers or talismans so nothing to worrie about :D
 

mercury71

Dedicated Member
Dedicated Member
Apr 3, 2006
155
3
64
this is to find dup items in TBL_ITEM table
SELECT DISTINCT i1.* FROM TBL_ITEM i1, TBL_ITEM i2
WHERE i1.FLD_MAKEINDEX=i2.FLD_MAKEINDEX
AND i1.FLD_CHARACTER<>i2.FLD_CHARACTER
ORDER BY i1.FLD_MAKEINDEX


ok i am very new to SQL can some 1 explain this in a plain way so i can understand it pls
 

Kaori

LOMCN MiR3 Queen!
VIP
Jun 3, 2004
3,584
38
285
Canada
well it's not the perfect way to find dup...
basically it's looking for same make index from 2 different characters.
if 1 person is holding the dup, it won't work.
 

Kaori

LOMCN MiR3 Queen!
VIP
Jun 3, 2004
3,584
38
285
Canada
oh got a better one to search for dups..

Code:
SELECT   *
FROM     TBL_ITEM
WHERE    FLD_MAKEINDEX IN
         (SELECT   FLD_MAKEINDEX
          FROM     TBL_ITEM
          GROUP BY FLD_MAKEINDEX
          HAVING   (COUNT(FLD_MAKEINDEX) > 1))
ORDER BY FLD_MAKEINDEX

just make sure the FLD_INDEX number is the same as well. FLD_INDEX=0 means death dropped or dura ran out.

don't have a good one to do both TBL_ITEM and TBL_SAVEDITEM yet...
 
Last edited:

Sammy

Dedicated Member
Dedicated Member
Sep 9, 2007
66
1
54
so your saying every line that appears on a server when this command is ran??

If so that means my own partner is a duper which isnt true lol
 

chimera

LOMCN VIP
VIP
Jul 30, 2003
1,054
23
235
UK
you can extract the databases into excel and do a count on each unique itemnumber (putting the count in a spare column), then simply doing a search in that column for anything over 1.

Will be other ways to do it but this is the way I know :)
 

Kaori

LOMCN MiR3 Queen!
VIP
Jun 3, 2004
3,584
38
285
Canada
so your saying every line that appears on a server when this command is ran??

If so that means my own partner is a duper which isnt true lol

not every line...
you have to investigate ALL lines to see who's the REAL owner.
 

Sammy

Dedicated Member
Dedicated Member
Sep 9, 2007
66
1
54
But how do u know which is the original item and which isnt?? is it something to do with the over 1 thing Chimera said about above??
 

Kaori

LOMCN MiR3 Queen!
VIP
Jun 3, 2004
3,584
38
285
Canada
original can be found in the log files if you run "LogDataServer"

probably not running if you are using 3.55 files
 

chimera

LOMCN VIP
VIP
Jul 30, 2003
1,054
23
235
UK
Probably an unpopular choice but I would remove the item completely from all characters.

And no Sammy what I said wouldn't highlight who owned the origional.
 

Kaori

LOMCN MiR3 Queen!
VIP
Jun 3, 2004
3,584
38
285
Canada
removing all is probably the easiest way...
keep in mind that db server lag and faults can cause dups to appear.

I did this before... maybe it works for you...

1. Remove ALL items as Chimera said
2. Tell users about it and they can claim it back via pm
3. Search logdata and find out if that's the original owner
4. Return that item
 

Sammy

Dedicated Member
Dedicated Member
Sep 9, 2007
66
1
54
ok thanks you 2 for help and advice ill work on it :)