Re: convert result to uppercase

From: "Lee Harr" <missive(at)hotmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: convert result to uppercase
Date: 2004-04-20 20:24:27
Message-ID: BAY2-F1052UAaTzvb5Y0001cc96@hotmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

>How do i convert a result to upper/lowercase?
>
>I'ld like to do the following:
>
>SELECT UPPER(lang) from languages;
>
>and get for example "uk" as "UK", "dk" AS "DK" and so on?
>

That looks right to me. Are you getting an error?

lee=# select version();
version
---------------------------------------------------------------------
PostgreSQL 7.4.2 on i386-portbld-freebsd4.9, compiled by GCC 2.95.4
(1 row)

lee=# select UPPER('MixED CaSes');
upper
-------------
MIXED CASES
(1 row)

lee=# select lower('MixED CaSes');
lower
-------------
mixed cases
(1 row)

_________________________________________________________________
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.
http://join.msn.com/?page=features/virus

Browse pgsql-general by date

  From Date Subject
Next Message Joe Lester 2004-04-20 20:24:34 Connection reset by peer
Previous Message Froggy / Froggy Corp. 2004-04-20 19:51:02 PL/SQL question