|
|
|
#1 |
|
Messages: n/a
Hébergeur: |
Hello, I'm trying to select all the records whose title does not starts
with a letter. The query SELECT * FROM bdoc_entries WHERE (NOT SUBSTRING(titre,1) IN ('a','b','c','d','e','f','g','h','i','j','k','l',' m','n','o','p','q','r','s','t','u','v','w','x','y' ,'z')) returns only the records starting with a number but forget the ones starting with something else (space, quotes, ...) I don't see why... Thanks |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
On Wed, 31 Oct 2007 14:52:04 +0100, Zouplaz <user@domain.invalid> wrote:
> Hello, I'm trying to select all the records whose title does not starts > with a letter. > > The query > > SELECT * FROM bdoc_entries > WHERE (NOT SUBSTRING(titre,1) IN > ('a','b','c','d','e','f','g','h','i','j','k','l',' m','n','o','p','q','r','s','t','u','v','w','x','y' ,'z')) > > returns only the records starting with a number but forget the ones > starting with something else (space, quotes, ...) > > I don't see why... SELECT * FROM table WHERE titre NOT REGEXP '^[[:alpha:]]'; -- Rik Wasmus |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
le 31/10/2007 14:59, Rik Wasmus nous a dit:
> > SELECT * FROM table WHERE titre NOT REGEXP '^[[:alpha:]]'; > Thanks a lot ! |
|
![]() |
| Outils de la discussion | |
|
|