Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to remove gibberish records?

Status
Not open for further replies.

squid2004

Programmer
Oct 11, 2004
4
US
I have a bunch of records in a database that have titles like Ãâ·ÑÔùËÍÐÅÏ¢·¢ËÍÈí¼þ and ¼«ËÙȺ·¢¹¤¾ßÃâ·ÑÏÂÔØ rather than Title1, Title2, etc.


Is there a way to now allow not traditional character sets to be inserted in the db either via SQL statement or ASP... and quickly, is there a way to remove all non-traditional character titles from a DB?

something like:
delete from table where title <> alphanum(title)


Am I dreaming here? it is kinda late...
 
You could probably want to do the checking of the new data validation via the ASP, maybe even javscript.

Removing the bunk records will be a little harder.

If there is a character which is in most or all of the records then you can do something like this.
Code:
delete from table
where title like '%Ã%'
go
delete from table
where title like '%â%'
go

Denny
MCSA (2003) / MCDBA (SQL 2000)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
 
>You could probably want to do the checking of the new data validation via the ASP, maybe even javscript.
---

Any chance you have an example of this? I want to make sure I allow A-Z and 0-9... but then probably apostrophes and quotes, etc.

Just need to make sure I filter out these garbage characters and symbols.
 
Just a thought ...

The standard ASCII character set has values from 0 to 127 (the printable range from 32 (the space character)). This includes all normal apha-numeric characters as well as punctuation symbols.

HOWEVER, there are characters that you may need above 127 (for example the UK currency symbol "£").


Hope this helps.

[vampire][bat]
 
Here is a site which has a good example of how to validate on input via javascript to ensure that only valid characters are entered.
To change the list of valid characters you simple add them to the var valid line.

Denny
MCSA (2003) / MCDBA (SQL 2000)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top