Обсуждение: Formatting time for INSERT INTO

Поиск
Список
Период
Сортировка

Formatting time for INSERT INTO

От
Rich Shepard
Дата:
   The table has a column 'coll_time' of type time without time zone. New
rows for the table are in a .sql file and the time values throw an error at
the colon between hours:minutes. Do time values need to be quoted?

TIA,

Rich


Re: Formatting time for INSERT INTO

От
Ben Chobot
Дата:
On Apr 25, 2012, at 4:01 PM, Rich Shepard wrote:

>  The table has a column 'coll_time' of type time without time zone. New
> rows for the table are in a .sql file and the time values throw an error at
> the colon between hours:minutes. Do time values need to be quoted?

Yes, (date)time values need to be quoted as if they were strings.

Re: Formatting time for INSERT INTO

От
Rich Shepard
Дата:
On Wed, 25 Apr 2012, Ben Chobot wrote:

> Yes, (date)time values need to be quoted as if they were strings.

   Thanks, Ben. I thought that was the case but wanted to confirm it.

Much appreciated,

Rich