Re: CAST and timestamp

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: CAST and timestamp
Дата
Msg-id 29744.1103589114@sss.pgh.pa.us
обсуждение исходный текст
Ответ на CAST and timestamp  ("Keith Worthington" <keithw@narrowpathinc.com>)
Ответы Re: CAST and timestamp  (Keith Worthington <KeithW@NarrowPathInc.com>)
Список pgsql-novice
"Keith Worthington" <keithw@narrowpathinc.com> writes:
> IPADB=# SELECT CAST(scan_date || scan_time AS timestamp) AS datetime_timestamp
> FROM data_transfer.tbl_inventory_scanner;
> ERROR:  Cannot cast type character to timestamp without time zone

> IPADB=# SELECT employee_id, item_id, CAST(quantity AS float4) AS quantity FROM
> data_transfer.tbl_inventory_scanner;
> ERROR:  Cannot cast type character varying to real

Try casting the inputs to type "text" and then to timestamp or real.

            regards, tom lane

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

Предыдущее
От: Steve Crawford
Дата:
Сообщение: Re: SQUID Log in PostgreSQL
Следующее
От: Hasnul Fadhly bin Hasan
Дата:
Сообщение: Inheritance