View previous topic :: View next topic
|
Author |
Message |
suzeet
New User
Joined: 16 May 2005 Posts: 54
|
|
|
|
Can I query a table to select is there any junk characters present in that or not? |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
please clarify the meaning of "JUNK" :-) |
|
Back to top |
|
|
suzeet
New User
Joined: 16 May 2005 Posts: 54
|
|
|
|
My query result should not contain any character except
0,1,2,3,4,5,6,7,8,9 or "." |
|
Back to top |
|
|
stodolas
Active Member
Joined: 13 Jun 2007 Posts: 632 Location: Wisconsin
|
|
|
|
Are you storing numeric data in a Text field in a database? That is just horrible design.
But you are contradicting yourself. First you ask if you can select junk characters then you say your result should only include
0,1,2,3,4,5,6,7,8,9 or ".". Are those what you are considering junk or are those the only valid characters? |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
What are formats of the columns? |
|
Back to top |
|
|
suzeet
New User
Joined: 16 May 2005 Posts: 54
|
|
|
|
Hi
Yrs...the following are the valid characters
0,1,2,3,4,5,6,7,8,9 or "." |
|
Back to top |
|
|
mkk157
Active User
Joined: 17 May 2006 Posts: 310
|
|
|
|
I believe, u r handling some numeric number in CHAR field and in that some junk characters are coming un-expectedly, U want to remove them.
If this is the case, then
with the following wuery u can list out all the fields which contains the junk characters.
SELECT * FROM <TABLE-NAME>
WHERE <FIELD-NAME> BETWEEN '000000' AND '999999'
OR <FIELD-NAME> = '.' |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
Quote: |
BETWEEN '000000' AND '999999' |
I would disagree on that, You are carrying on an alphanumeric compare
and with Your comparison "111aaa" would be legal :-) |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
tables do not have fields. I realize that rookies talk like that, but if you are providing 'professional' help, clean up your rap. |
|
Back to top |
|
|
|