Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
jfriedl
Starting Member
4 Posts |
Posted - 2011-10-21 : 15:04:31
|
| one of our jr dba's accidently ran a SSIS package that created tons of duplicate email addresses in our ERP system. normally we would just revert to backup but no one caught the error and this was done months ago apparently. Basically in my table I have0000005 1 JML test@test.com NULLand0000005 2 JML test@TEST.COM Ywhere the first column is my primary key and the second column lists the position of the email in the form that its listed on. I need to remove the lower case duplicates but Im completely stumped on how to do this. the database collation is Latin1_General_BINany ideas? |
|
|
Sachin.Nand
2937 Posts |
Posted - 2011-10-21 : 15:35:38
|
How about this ?Select * from your table where lower(email)=email collate Latin1_General_CS_AS This will return all the emails which are in lower case.PBUH |
 |
|
|
jfriedl
Starting Member
4 Posts |
Posted - 2011-10-21 : 15:52:55
|
quote: Originally posted by Sachin.Nand How about this ?Select * from your table where lower(email)=email collate Latin1_General_CS_AS This will return all the emails which are in lower case.PBUHThis helps me narrow it down, thanks!
|
 |
|
|
|
|
|