pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Pavel Stehule <pavel.stehule@gmail.com>
To: Rohit Suman <handsome_94@yahoo.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: ERROR: operator does not exist: date ~~ unknown
Date: Sun, 12 Apr 2009 09:36:16 +0200
Message-ID: <162867790904120036o1d2ae20dn9fbdc0fc4640a06e@mail.gmail.com> (raw)
In-Reply-To: <60074.805.qm@web33104.mail.mud.yahoo.com>
References: <60074.805.qm@web33104.mail.mud.yahoo.com>

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.



view thread (4+ messages)  latest in thread

Message-ID: <162867790904120036o1d2ae20dn9fbdc0fc4640a06e@mail.gmail.com>
Permalink:  ../162867790904120036o1d2ae20dn9fbdc0fc4640a06e@mail.gmail.com/
Also on:    postgresql.org/message-id/162867790904120036o1d2ae20dn9fbdc0fc4640a06e@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: pavel.stehule@gmail.com, handsome_94@yahoo.com
  Subject: Re: ERROR: operator does not exist: date ~~ unknown
  In-Reply-To: <162867790904120036o1d2ae20dn9fbdc0fc4640a06e@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox