Thoughts from Dan Miser RSS 2.0
 Monday, October 22, 2007
Moving from a legacy system, one needs to appropriately deal with bad data in the database. For example, in order to put a primary key on a table, the column(s) in that primary key must be able to uniquely identify one record. If you need to find rows with duplicate entries before adding a primary key, you can start with this query:


select Id
from MyTable
group by Id
having count(*) > 1
Monday, October 22, 2007 1:33:51 PM (Central Standard Time, UTC-06:00)  #    Comments [0] -
ADO.NET
Navigation
Archive
<August 2008>
SunMonTueWedThuFriSat
272829303112
3456789
10111213141516
17181920212223
24252627282930
31123456
About the author/Disclaimer

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

© Copyright 2008
Dan Miser
Sign In
Statistics
Total Posts: 306
This Year: 21
This Month: 0
This Week: 0
Comments: 604
All Content © 2008, Dan Miser
DasBlog theme 'Business' created by Christoph De Baene (delarou)