Re: Results per letter query

From: "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: Results per letter query
Date: 2007-06-21 11:12:06
Message-ID: 20070621111206.GK1405@a-kretschmer.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

am Thu, dem 21.06.2007, um 12:59:05 +0200 mailte Dani Castaños folgendes:
> >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

No, the ~ - operator (Regex), try this:

select chr(x), count(1) from generate_series(32,90) x, w where upper(substring (w.t from 1 for 1)) = chr(x) group by 1;

Andreas
--
Andreas Kretschmer
Kontakt: Heynitz: 035242/47150, D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID: 0x3FFF606C, privat 0x7F4584DA http://wwwkeys.de.pgp.net

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Loredana Curugiu 2007-06-21 13:00:05 Re: [SQL] Select last there dates
Previous Message Dani Castaños 2007-06-21 10:59:05 Re: Results per letter query