Re: left() in postgres

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Peter Nixon <listuser(at)peternixon(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: left() in postgres
Date: 2002-10-25 16:36:24
Message-ID: 200210251636.g9PGaO902807@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Try substring().

---------------------------------------------------------------------------

Peter Nixon wrote:
> Hi Guys
>
> I am trying to do a query similar to the following:
>
> select left(field,3) from table;
>
> Now this works in Mysql/Access etc etc, but not in postgres
> (I am running PostgreSQL 7.2)
>
> Can anyone suggest how to do this in postgres? I have a database with many
> millions of records, and this functionality is essential for me.
>
> PS. I did do a google search etc before posting.
>
> Regards
>
> --
>
> Peter Nixon
> http://www.peternixon.net/
> PGP Key: http://www.peternixon.net/public.asc
>
> ---------------------------(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
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Joseph Shraibman 2002-10-25 17:04:57 Re: Request for List of Known Bugs
Previous Message Peter Nixon 2002-10-25 16:31:17 left() in postgres