Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: ora-936: version differences

Re: ora-936: version differences

From: Antti Järvinen <costello_at_iki.fi>
Date: 22 Oct 2001 15:56:20 +0300
Message-ID: <m3n12jal57.fsf@muikku.baana.suomi.net>


"Sybrand Bakker" <postbus_at_sybrandb.demon.nl> writes:
> You are using inline views in your in statement in a fashion which
> definitely isn't available in 7.3.4. I've never used 8.0.4, but I know 8i
> has been greatly enhanced with respect to inline views
> Basically you can use inline views in 7.3.4 in your from clause only, NOT in
> a select clause and NOT in a subquery.

I have a table with times in it, I need to find the time closest to given time, in my example this time was '18.10.2001 15:11:58' and the semantics of my query tries to be that "give me the time that has smallest difference to given time" -> is there other choice than doing at least 2 queries and comparing in host language?

here's my original:
> > select hiredate from emp where hiredate =
> > (
> > select min(hiredate) from emp where hiredate in
> > (
> > ( to_date('18.10.2001 15:11:58','dd.mm.yyyy hh24:mi:ss') -
> > (select min(abs(hiredate-
> > to_date('18.10.2001 15:11:58','dd.mm.yyyy hh24:mi:ss'))) from emp)
> > )
> > ,
> > ( to_date('18.10.2001 15:11:58','dd.mm.yyyy hh24:mi:ss') +
> > (select min(abs(hiredate-
> > to_date('18.10.2001 15:11:58','dd.mm.yyyy hh24:mi:ss'))) from emp)
> > )
> > )
> > ) ;
> >
> > returns a time with server version 816 and ora-936 on 734 and 804 I also
> > tried? there is nothing very special about the query, isn't there?
> >

-- 
Antti Järvinen, costello_at_iki.fi
            "concerto for two faggots and orchestra" 
Received on Mon Oct 22 2001 - 07:56:20 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US