From: | Marcelo Pereira <gandalf(at)sum(dot)desktop(dot)com(dot)br> |
---|---|
To: | Devrim GUNDUZ <devrim(at)oper(dot)metu(dot)edu(dot)tr> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Select <-> Case Insensitive |
Date: | 2002-02-22 13:34:51 |
Message-ID: | Pine.LNX.4.20.0202221034400.18090-100000@ni.hmmg.sp.gov.br |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Nice!!
Thanks!!
Marcelo Pereira
-- Remember that only God and Esc+:w saves.
__
(_.\ Marcelo Pereira |
/ / ___ |
/ (_/ _ \__ Matematica/99 - IMECC |
_______\____/_\___)___Unicamp_______________/
--- Devrim GUNDUZ, with his fast fingers, wrote:
:>
:> Hi,
:>
:> The query
:>
:> SELECT * from mytable order by lower(description);
:>
:> could solve your problem.
:>
:> test=# SELECT * from mycase order by lower(descr);
:> code | descr
:> ------+-------
:> 1 | A
:> 4 | a
:> 2 | B
:> 5 | b
:> 3 | C
:> 6 | c
:>
:> Regards,
:>
:> Devrim
:>
:> On Fri, 22 Feb 2002, Marcelo Pereira wrote:
:>
:> > Hello All,
:> >
:> > How can I do a query make the `order' statment sort the tuples without
:> > looking for the `case' ?
:> >
:> > I have a table like this:
:> >
:> > cod | Description
:> > ----+----------------
:> > 1 | A
:> > 2 | B
:> > 3 | C
:> > 4 | a
:> > 5 | b
:> > 6 | c
:> >
:> > I would like to do a `select * from thistable order by description' that
:> > returns the following:
:> >
:> > cod | Description
:> > ----+----------------
:> > 1 | A
:> > 4 | a
:> > 2 | B
:> > 5 | b
:> > 3 | C
:> > 6 | c
:> >
:> > How can I do it?
:> >
:> > [Ps.: Sorry by this simply question, but I couldn't find anything at the
:> > man pages!!]
:> >
:> > Thanks in advance.
:> >
:> > Marcelo Pereira
:> >
:> > -- Remember that only God and Esc+:w saves.
:> > __
:> > (_.\ Marcelo Pereira |
:> > / / ___ |
:> > / (_/ _ \__ Matematica/99 - IMECC |
:> > _______\____/_\___)___Unicamp_______________/
:> >
:> >
:> > ---------------------------(end of broadcast)---------------------------
:> > TIP 3: if posting/reading through Usenet, please send an appropriate
:> > subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
:> > message can get through to the mailing list cleanly
:> >
:>
:> --
:>
:> Devrim GUNDUZ
:>
:> devrim(at)oper(dot)metu(dot)edu(dot)tr
:> devrim(dot)gunduz(at)linux(dot)org(dot)tr
:> devrimg(at)tr(dot)net
:>
:> Web : http://devrim.oper.metu.edu.tr
:> ------------------------------------------------------------------
:>
:>
:>
:>
From | Date | Subject | |
---|---|---|---|
Next Message | Devrim GUNDUZ | 2002-02-22 13:46:26 | Re: number of connections to postmaster |
Previous Message | Marcelo Pereira | 2002-02-22 13:34:35 | Re: Select <-> Case Insensitive |