Re: simple select statement problem

From: Álvaro G. Vicario <alvaro.NOSPAMTHANX_at_demogracia.com>
Date: Thu, 30 Apr 2009 17:17:35 +0200
Message-ID: <gtcfef$rnr$1_at_news.eternal-september.org>



maunicar_at_gmail.com escribió:
> Here I am selecting simple statement but I am getting ora01722 error.
> Can somebory please help me on this.
> Thanks in advance.
> Manchi.
>
> select io.accession,
> to_date(io.date_ordered, 'yyyy-mm-dd hh24:mi:ss') ACCESSION_KEY
> from instrument_orders io
> where to_char(io.date_ordered, 'yyyy-dd-mm hh24:mi:ss') > to_char
> ('2009-01-04' , 'yyyy-dd-mm');

to_date(io.date_ordered, 'yyyy-mm-dd hh24:mi:ss') to_char(io.date_ordered, 'yyyy-dd-mm hh24:mi:ss')

One of these must be wrong. What's "io.date_ordered", a DATE or a VARCHAR2?

-- 
-- http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web: http://borrame.com
-- Mi web de humor satinado: http://www.demogracia.com
--
Received on Thu Apr 30 2009 - 10:17:35 CDT

Original text of this message