Hi all,
I'm trying to reduce the size of a table by only returning unique rows based on name, IP, Useragent.
for example, I have something like,
and what I want to do is (somehow) compare each row with each other (probably not efficient, as there's 23,000+ rows) to check for changes to any of the main three columns. The example would return,
as, "bob" has two rows that match all of the three main columns (name,IP,UA) the older row can be removed, but because "tom" used the name "tommy" and a different browser only the one row was removed that matched all three columns.
I hope that makes sense, as I say, I only "want" to do this, not "need", so if it's too tricky then please feel free to ignore this post.
Thanks
I'm trying to reduce the size of a table by only returning unique rows based on name, IP, Useragent.
for example, I have something like,
Code:
RowID Name IP UA Date
----------------------------------------------------------------------------------------------------------------------------------------------
1 bob 127.0.0.1 Opera/9.60 (Windows NT 5.1; U; ru) 11/14/2008 10:18:10 AM
2 tom 255.255.255.255 Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) 11/12/2008 11:10:50 AM
3 tommy 255.255.255.255 Opera/9.51 (Windows NT 5.1; U; cs) 11/11/2008 8:15:31 AM
4 bob 127.0.0.1 Opera/9.60 (Windows NT 5.1; U; ru) 11/10/2008 9:24:40 AM
5 tom 255.255.255.255 Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) 11/9/2008 10:27:04 AM
and what I want to do is (somehow) compare each row with each other (probably not efficient, as there's 23,000+ rows) to check for changes to any of the main three columns. The example would return,
Code:
RowID Name IP UA Date
----------------------------------------------------------------------------------------------------------------------------------------------
1 bob 127.0.0.1 Opera/9.60 (Windows NT 5.1; U; ru) 11/14/2008 10:18:10 AM
2 tom 255.255.255.255 Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) 11/12/2008 11:10:50 AM
3 tommy 255.255.255.255 Opera/9.51 (Windows NT 5.1; U; cs) 11/11/2008 8:15:31 AM
as, "bob" has two rows that match all of the three main columns (name,IP,UA) the older row can be removed, but because "tom" used the name "tommy" and a different browser only the one row was removed that matched all three columns.
I hope that makes sense, as I say, I only "want" to do this, not "need", so if it's too tricky then please feel free to ignore this post.
Thanks