Search Postgresql Archives

Re: Using right() in a view

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

 



Chrishelring wrote:
> 
> CREATE OR REPLACE VIEW test AS 
> SELECT 
>   right(cast('000' as text) || cast(road_number as text), 4) AS GEO_ADRESSE
>   
> FROM rk_ois.bbrbygning
> WHERE ejerlav <> 0
> 
> to ensure that the road_number would be a fixed size (four digitis).
> Unfortunately this doesn't work. 

Try using:
   select to_char(road_number, 'FM0000') as GEO_ADRESSE

HTH

Bosco.

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