Link to home
Start Free TrialLog in
Avatar of dileepav
dileepavFlag for India

asked on

Help required in pulling records for a particular date and time?

Hi Experts,

Could you please help me in executing the following query:

Select * from RELAY_POLLER_LOG where lot_type_fk=1 and actual_date between '03-May-2011' and '04-May-2011'

I am using Oracle 10g as the database.

Thx
Dil.
Avatar of Sean Stuber
Sean Stuber

first, you are using implicit conversion to treat your strings as dates.  don't do that,  always (really, ALWAYS) use explicit conversions

try this...

Select * from RELAY_POLLER_LOG
where lot_type_fk=1
and actual_date  between to_date('03-May-2011','dd-Mon-yyyy') and to_date('04-May-2011','dd-Mon-yyyy')

if this doesn't work,  please post the errors or other results
ASKER CERTIFIED SOLUTION
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dileepav

ASKER

Thx Experts
if there are equivalent answers posted at the same time you should split among all of them