I have a table that looks like this...
SomeTable
userID(int)
somedate(datetime)
somethingelse(varchar)
There is no unique field currently. I want to make the first two columns together the primary key(userID, somedate).
When I do this I get an error for primary contraint.
I relize that there must me duplicate records with same userID and somedate.
How can I query this table to pull those dups out so I can change them to make my necessary change?
For some reason I'm having a brainfart on this. This is what I've tried...
Select TS.userID, TS.somedate from SomeTable as TS where (select * from SomeTable as TD where TS.userID = TD.userID and TS.somedate = TD.somedate)
This seems to bring back all records though.
SomeTable
userID(int)
somedate(datetime)
somethingelse(varchar)
There is no unique field currently. I want to make the first two columns together the primary key(userID, somedate).
When I do this I get an error for primary contraint.
I relize that there must me duplicate records with same userID and somedate.
How can I query this table to pull those dups out so I can change them to make my necessary change?
For some reason I'm having a brainfart on this. This is what I've tried...
Select TS.userID, TS.somedate from SomeTable as TS where (select * from SomeTable as TD where TS.userID = TD.userID and TS.somedate = TD.somedate)
This seems to bring back all records though.