From: | "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: Needs Query |
Date: | 2007-05-08 12:58:54 |
Message-ID: | 20070508125854.GE19006@a-kretschmer.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
am Tue, dem 08.05.2007, um 17:48:47 +0530 mailte Penchalaiah P. folgendes:
>
>
>
>
>
>
>
>
> In a table, a column contains
>
>
>
> Suneelllllllllllllll
>
> Sudhakarrrrrrrrrr
>
> Vivekkkkkkkkkk
>
> Ramanaaaaaaaaa
>
>
>
>
>
> But my output is
>
> Suneel
>
> Sudhakar
>
> Vivek
>
> Ramana
>
> I want a query to get my output like above??..
write a stored proc. within this proc: (oversimplified)
- calculate the length of the string with length() -> length
- extract substring(string, length, length) -> last_char
- regexp_replace(string, last_char||'*$', last_char)
Andreas
--
Andreas Kretschmer
Kontakt: Heynitz: 035242/47150, D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID: 0x3FFF606C, privat 0x7F4584DA http://wwwkeys.de.pgp.net
From | Date | Subject | |
---|---|---|---|
Next Message | Jonah H. Harris | 2007-05-08 13:30:33 | Re: Query RE using COPY |
Previous Message | Penchalaiah P. | 2007-05-08 12:18:47 | Needs Query |