d34db0lts
11-03-2006, 12:26 AM
thank you to anybody that bothered opening this thread...
this is my dilemma.
so i have a nasty database that has wrong data
this is basically the jist of it
ID date cartID
1 06/10 234
2 06/10 234
3 06/11 234
4 06/11 567
5 06/11 567
by the way the database is set up and the situation, row three's cartID is wrong and should really be 567.
now, i could look at the database and look where this problem occurs but that would take a long time and it's not really productive. so i'm trying to figure out a way to point out any record that creates the unique combination of date and cartID, because if the combination of date and cartID only happens once then i know something is up. Now i've tried using Distinct and First/Last/Top...so many queries in the sql viewer that i'm all confused and have no base query to work with anymore.
if anybody knows what sql code/lines i would need to display records like record 3 and then another sql code/lines that would allow me to change the value of cartID to the appropriate one that would be awesome.
once again, thank you for reading this.
this is my dilemma.
so i have a nasty database that has wrong data
this is basically the jist of it
ID date cartID
1 06/10 234
2 06/10 234
3 06/11 234
4 06/11 567
5 06/11 567
by the way the database is set up and the situation, row three's cartID is wrong and should really be 567.
now, i could look at the database and look where this problem occurs but that would take a long time and it's not really productive. so i'm trying to figure out a way to point out any record that creates the unique combination of date and cartID, because if the combination of date and cartID only happens once then i know something is up. Now i've tried using Distinct and First/Last/Top...so many queries in the sql viewer that i'm all confused and have no base query to work with anymore.
if anybody knows what sql code/lines i would need to display records like record 3 and then another sql code/lines that would allow me to change the value of cartID to the appropriate one that would be awesome.
once again, thank you for reading this.