Re: ask: select right(column) ??? - Mailing list pgsql-general

From Lennin Caro
Subject Re: ask: select right(column) ???
Date
Msg-id 58935.28086.qm@web59516.mail.ac4.yahoo.com
Whole thread Raw
In response to ask: select right(column) ???  (hendra kusuma <penguinroad@gmail.com>)
Responses Re: ask: select right(column) ???  (Sam Mason <sam@samason.me.uk>)
List pgsql-general
> I have simple question
> I tried following code
>
>  select right(column, number_of_character) from table
>
> but it didn't work, saying that pg doesn't have the
> function
> is there any way to achieve such output?
>
> honestly I have no idea that such simple feature
> doesn't exist in postgresql
> or am I wrong? since I look at SQL Key Words table and
> it's written as
> reserved
>
> Thank you
> Regards
> Hendra

you are right but you can use the substring function, like this

select 'test123',substring('test123' from '...$')

this return '123'







pgsql-general by date:

Previous
From: Sam Mason
Date:
Subject: Re: ask: select right(column) ???
Next
From: Craig Ringer
Date:
Subject: Re: idle DB and resources