Re: How I can get the real data type result instead of

Поиск
Список
Период
Сортировка
От Bruno Wolff III
Тема Re: How I can get the real data type result instead of
Дата
Msg-id 20060322033137.GB2262@wolff.to
обсуждение исходный текст
Ответ на Re: How I can get the real data type result instead of  ("William ZHANG" <uniware@zedware.org>)
Ответы Re: How I can get the real data type result instead of  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
On Tue, Mar 21, 2006 at 21:16:03 +0800,
  William ZHANG <uniware@zedware.org> wrote:
>
> "Sigurdur Gunnlaugsson" <sig@fjolnet.net>
> > On Mon, 2006-03-20 at 21:10, Wei Wei wrote:
> >
> > Try:
> >
> > order by count(id)/age::float
>
> Or you can use the standard grammer:
>
> order by cast(count(id)/age as float)

Don't you have to cast before the divide? I think the above will convert
the truncated result to float.
However he could do something like:
order by count(id)/cast(age as float)

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: ambuild parameters
Следующее
От: "Aftab Alam"
Дата:
Сообщение: Re: ambuild parameters