Re: Using right() in a view

Поиск
Список
Период
Сортировка
От Bosco Rama
Тема Re: Using right() in a view
Дата
Msg-id 4DDA8D42.4000003@boscorama.com
обсуждение исходный текст
Ответ на Using right() in a view  (Chrishelring <christianhelring@gmail.com>)
Список pgsql-general
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.

В списке pgsql-general по дате отправления:

Предыдущее
От: Chitra
Дата:
Сообщение: Postgre Client only Install on Linux- 8.4.7
Следующее
От: Bosco Rama
Дата:
Сообщение: Re: Postgres 8.3.5 - ECPG and the use of descriptors and cursors in multi-threaded programs