Re: lpad question

Поиск
Список
Период
Сортировка
От Johnson, Shaunn
Тема Re: lpad question
Дата
Msg-id 73309C2FDD95D11192E60008C7B1D5BB04C7410E@snt452.corp.bcbsm.com
обсуждение исходный текст
Ответ на lpad question  ("Johnson, Shaunn" <SJohnson6@bcbsm.com>)
Список pgsql-general
--howdy:
 
--okay, i *think* i'm close, but i'm not sure about what
--i'm seeing as results.
 
--i have this:
 
[snip]
 
testdb=> select lpad(to_char(i_pd,'99999D99'),10,'0') as i_pd from t_table limit 1;
 
[/snip]
 
and the results are:
 
[snip results]
 
    i_pd
------------
 0      .00
(1 row)
 
[/snip results]
 
* Why is there a gap between the lead zero and the decimals?
* Where is the docs to tell me what, exactly, this is doing?
 
Thanks!
 
-X
 
 
 
-----Original Message-----
From: Johnson, Shaunn

Howdy:

Running PostgreSQL 7.2.1 on RedHat Linux 7.2.

I'm trying to create a view where I lpad a numeric field with leading
zeros and keep the two digits right of the decimal.  Can someone send an example? 

Thanks!

-X

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Using aggregate functions .. (a BUG?)
Следующее
От: Darren Ferguson
Дата:
Сообщение: Re: Using aggregate functions .. (a BUG?)