On Thursday 15 May 2003 9:05 pm, Cyber Join wrote:
> Hi I need select the first 3 characters from a table
>
> I try this but doesn't work
>
> "SELECT left(data,3) AS value FROM table;"
>
> i see the left function doesn't work what is the similar function in
> postgresql
It's called "substr":
richardh=# select substr('abcde',3);
substr
--------
cde
(1 row)
richardh=# select substr('abcde',1,3);
substr
--------
abc
(1 row)
--
Richard Huxton