Re: ERROR: operator does not exist: date ~~ unknown

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: ERROR: operator does not exist: date ~~ unknown
Дата
Msg-id 162867790904120036o1d2ae20dn9fbdc0fc4640a06e@mail.gmail.com
обсуждение исходный текст
Ответ на ERROR: operator does not exist: date ~~ unknown  (Rohit Suman <handsome_94@yahoo.com>)
Список pgsql-sql
Hello

it means - there are not operator LIKE for datatype date. Why do you
do it? Try to look on date_part or extract functions.

Fast solution, bot not optimal, is cast date to text via function
to_char(date, 'mask')

regards
Pavel Stehule


2009/4/12 Rohit Suman <handsome_94@yahoo.com>:
> Hi
>
> I've a table bins in which I've a column named "Date In"  which stores
> values of "Date" type. I've postgresql 8.3.5
>
> Now when I execute query " select * from bins where "Date In" like '%'; " I
> get the folowing error :
>
>
> SQL error:
>
> ERROR:  operator does not exist: date ~~ unknown
> LINE 1: select * from bins where "Date In" like '%';
>                                            ^
> HINT:  No operator matches the given name and argument type(s). You might
> need to add explicit type casts.
>
> In statement:
> select * from bins where "Date In" like '%';
>
> Please help...I'm stuck for like 3-4 hours now on this X_X
>
> Rohit
>
> ________________________________
> Add more friends to your messenger and enjoy! Invite them now.


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

Предыдущее
От: Rohit Suman
Дата:
Сообщение: ERROR: operator does not exist: date ~~ unknown
Следующее
От: Rohit Suman
Дата:
Сообщение: Fw: ERROR: operator does not exist: date ~~ unknown