Обсуждение: Get a time from a char column

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

Get a time from a char column

От
Blaise Carrupt
Дата:
Hi !

What I would like is this :

insert into tt1
(select a from tt2)

where tt1.x field is a time, and tt2.a field is a char containing '10:00'.

Doing that, Postgres tells me something like 'x is of type time and a of type 
bpchar'. That's true, but I can't find the way to cast my char field in a time.

And in the other hand, this works : insert into tt1 values('10:00')
what seems to be the same...

Does someone have an idea ?