I have a problem with a large table with redundant data (>1GB).
The table looks something like this
ID, date, sequence number, details
1, x , 1 , aaaaa
1, x , 2 , bbbbb
1, x , 3 , ccccc
1, x+1 , 1 , aaaaa
1, x+1 , 2 , bbbbb
1, x+1 , 3 , ccccc
.....
1, x+n , 1 , ZZZ
The problem arises in the fact all data is duplicated until it changes in the details field (e.g. from the series aaaaa, bbbbbb, cccccc to ZZZ). I must prune this table so that only the first instance of any combination (e.g. the aaaaa, bbbbb, ccccc AND ZZZ) is kept and the rest is deleted. All values in the table except for the date (the set) should exactly match before I can delete it and I need to keep the first unique set.
I wrote what I thought to be a very elegant code (which is obviously not) to identify the first instances and process it into arrays.
The code stored the first three rows into an array aFirstSeries and the next three rows into array aRedundantSeries
My problem comes in here
Does anyone have a help with this?
Thanks in advance!
The table looks something like this
ID, date, sequence number, details
1, x , 1 , aaaaa
1, x , 2 , bbbbb
1, x , 3 , ccccc
1, x+1 , 1 , aaaaa
1, x+1 , 2 , bbbbb
1, x+1 , 3 , ccccc
.....
1, x+n , 1 , ZZZ
The problem arises in the fact all data is duplicated until it changes in the details field (e.g. from the series aaaaa, bbbbbb, cccccc to ZZZ). I must prune this table so that only the first instance of any combination (e.g. the aaaaa, bbbbb, ccccc AND ZZZ) is kept and the rest is deleted. All values in the table except for the date (the set) should exactly match before I can delete it and I need to keep the first unique set.
I wrote what I thought to be a very elegant code (which is obviously not) to identify the first instances and process it into arrays.
The code stored the first three rows into an array aFirstSeries and the next three rows into array aRedundantSeries
My problem comes in here
the logical value always returns true! In debugging the arrays clearly differ when for example the first rows of ZZZ is stored to aRedundantSeries. (array aFirstSeries now have 3 row elements and aRedundantSeries only one.if aFirstSeries = aRedundantSeries ...
Does anyone have a help with this?
Thanks in advance!