How to round a double8 data type in sql?

Поиск
Список
Период
Сортировка
От Chuck Roberts
Тема How to round a double8 data type in sql?
Дата
Msg-id a66f47935d0a8364587b80cc083eb8d6@mail.gmail.com
обсуждение исходный текст
Ответы Re: How to round a double8 data type in sql?  (David G Johnston <david.g.johnston@gmail.com>)
Список pgsql-novice

Postgres 8.4

 

How do I use round() in sql on a double8 data type? While in an SQL statement, I can use round just fine on a field that is a type of double. Ex: Select round(esthours,2) as ehrs from job;

 

But a different field has a type of double8 and I get an error when I try to use round on it:

select round(acthours,2) as ahrs from job;

 

The error is: "No function matches the given name and argument types. You might need to add explicit type casts."

 

I searched around on Google but found no help on doing type casts.

 

Thank you.

 

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Do not output header line in psql
Следующее
От: David G Johnston
Дата:
Сообщение: Re: How to round a double8 data type in sql?