Search Postgresql Archives

Re: ask: select right(column) ???

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 
> 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'





      

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux