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 |
ernie99
Starting Member
12 Posts |
Posted - 2007-11-20 : 01:31:33
|
Hi everyone, does anyone know a query that will delete a row from a table if a specified column contains unrecognisable characters?I have a database of all the cities of the world. Some of the city names are defined in their native language so I have city names that contain values such as Santa Llogaia dʿÀlguema and Jaén . I don't have the time or resources to find out the English names for these places so I want to just remove them from the database. I'm looking for a query that is something like delete from cities where cityname doesn't contain a-z for all the characters that make up the cityname.Any ideas? |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2007-11-20 : 02:30:56
|
Select city from tablewhere city like like '%[^a-zA-Z]%'If you see the cities with strage characters, then delete from tablewhere city like like '%[^a-zA-Z]%'MadhivananFailing to plan is Planning to fail |
 |
|
ernie99
Starting Member
12 Posts |
Posted - 2007-11-20 : 04:09:26
|
Just what I needed! Thanks for the help Madhivanan. |
 |
|
|
|
|