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 -> SQL SELECT with date restriction, please help !

SQL SELECT with date restriction, please help !

From: Nicolas Ungern-Sternberg <nungern_at_sbe-online.com>
Date: Fri, 31 Aug 2001 10:55:08 +0200
Message-ID: <9mnj8k$e7q$1@s1.read.news.oleane.net>


hello every body,

Sorry but my english is bad...

1 ) FIRST SELECT : select count(*) from sbedba.fiches
where dateent=to_date('30/08/2001')

 COUNT(*)


       72

Plan d'exécution


   0 SELECT STATEMENT Optimizer=CHOOSE (Cost=1 Card=1 Bytes=7)    1 0 SORT (AGGREGATE)

   2    1     INDEX (RANGE SCAN) OF 'IDX_FICHES_DATEENT' (NON-UNIQUE)
          (Cost=1 Card=264 Bytes=1848)


2 ) SECOND SELECT select count(*) from sbedba.fiches
where to_char(dateent,'DD/MM/YYYY')=to_date('30/08/2001')

COUNT(*)


     1004

Plan d'exécution


   0 SELECT STATEMENT Optimizer=CHOOSE (Cost=2395 Card=1 Bytes=7)    1 0 SORT (AGGREGATE)
   2 1 TABLE ACCESS (FULL) OF 'FICHES' (Cost=2395 Card=2457 Bytes=17199)

I'm understand that the problem is the TIME in my DATEENT column ; But what is the solution ???

Thank you for advance,

Nicolas.

--
Nicolas Ungern-sternberg
Service informatique - 376
nungern_at_sbe-online.com
03.21.10.08.35
Received on Fri Aug 31 2001 - 03:55:08 CDT

Original text of this message

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