From: | Dani Castaños <dcastanos(at)androme(dot)es> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: Results per letter query |
Date: | 2007-06-21 10:59:05 |
Message-ID: | 467A59F9.4030801@androme.es |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
> am Thu, dem 21.06.2007, um 12:42:52 +0200 mailte Dani Castaños folgendes:
>
>>> test=*# select chr(x), count(1) from generate_series(65,90) x, w where
>>> upper(substring (w.t from 1 for 1)) ~ chr(x) group by 1;
>>> chr | count
>>> -----+-------
>>> T | 1
>>> B | 1
>>> F | 2
>>> (3 rows)
>>>
>>>
>>>
>>> Andreas
>>>
>>>
>> It's exactly what i want. Just one more thing... What if i want also the
>> ones that begin by a non-alphabetical character.
>> In your example:
>>
>
> change the generate_series(65,90) to generate_series(32,90)
>
>
> Andreas
>
With only changing 65 to 32:
ERROR: invalid regular expression: parentheses () not balanced
I think, it could be a problem with UPPER and non alphabetical chars
--
*Dani Castaños Sánchez*
dcastanos(at)androme(dot)es <mailto:dcastanos(at)androme(dot)es>
ANDROME Iberica
http://www.androme.es
Constança, 5, 08029 Barcelona
Tel: +34 934948850
Fax: +34 934196094
From | Date | Subject | |
---|---|---|---|
Next Message | A. Kretschmer | 2007-06-21 11:12:06 | Re: Results per letter query |
Previous Message | A. Kretschmer | 2007-06-21 10:50:45 | Re: Results per letter query |