SQL and to_date problem
From: Holger Kramer <hkramer_at_gmx.net>
Date: Tue, 08 Sep 1998 11:49:49 +0200
Message-ID: <35F4FDBD.F8C1CCCF_at_gmx.net>
Hi!
Date: Tue, 08 Sep 1998 11:49:49 +0200
Message-ID: <35F4FDBD.F8C1CCCF_at_gmx.net>
Hi!
I want to query for all rows with a defined date:
select count(*)
This works but the performance is poor. I think its because the
conversation from date to char on each row.
One other solution is to make a conversation on the static part:
select count(*)
from ia_artikel
where to_char( ausgabedatum, 'DD.MM.YY' ) = '28.09.99';
from ia_artikel
where ausgabedatum = to_date('28.08.99','DD.MM.YY');
But this does not work! Why?
Bye,
Holger
Received on Tue Sep 08 1998 - 11:49:49 CEST