Hello,
I need an efficient algorithm to SELECT rows from a table, but NOT already previously SELECTed rows.
For ex., if table rows are
Col1 Col2 Col3
Id1 201 1
Id2 300 4
Id3 150 1
Id4 162 3
Id5 190 4
Id6 305 3
SELECT1 :
"SELECT * FROM Table WHERE Col3 = 3"
will selects rows Id4 and Id6.
SELECT2 :
"SELECT * FROM Table WHERE Col2 BETWEEN 150 AND 200"
will selects rows Id1, Id3 and Id5, but NOT Id4 as it was already selected by SELECT1.
And so on ...
(I need to keep original data unchanged, in a copy or else)
Thank you for your help in this, intelligent design will be recognize in this case.
I need an efficient algorithm to SELECT rows from a table, but NOT already previously SELECTed rows.
For ex., if table rows are
Col1 Col2 Col3
Id1 201 1
Id2 300 4
Id3 150 1
Id4 162 3
Id5 190 4
Id6 305 3
SELECT1 :
"SELECT * FROM Table WHERE Col3 = 3"
will selects rows Id4 and Id6.
SELECT2 :
"SELECT * FROM Table WHERE Col2 BETWEEN 150 AND 200"
will selects rows Id1, Id3 and Id5, but NOT Id4 as it was already selected by SELECT1.
And so on ...
(I need to keep original data unchanged, in a copy or else)
Thank you for your help in this, intelligent design will be recognize in this case.