|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Selecting 0-9
OK I have a page which selects all the values from my table if they start w/ the current letter. This works. But how do I do it so that it selects only values that start with a number?
|
|
#2
|
|||
|
|||
|
RE: Selecting 0-9
If the number is held in a text field could you use the ord() function to match against the ascii code?
J |
|
#3
|
||||
|
||||
|
RE: Selecting 0-9
But Is there anyway I can do it with like statements?
|
|
#4
|
|||
|
|||
|
RE: Selecting 0-9
... WHERE field RLIKE "^[0-9]"
should work, I think |
|
#5
|
|||
|
|||
|
RE: Selecting 0-9
I was thinkning along the lines of:
SELECT values from table WHERE ORD(field) = ASCII(5) which would return all fields starting with 5, but the same result using: SELECT values from table WHERE field RLIKE "^5" is a lot more elegant - nice one xs0! |
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Database Help > Selecting 0-9 |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|