Home » SQL & PL/SQL » SQL & PL/SQL » time issue
time issue [message #37211] Thu, 24 January 2002 11:44 Go to next message
Lance Pris
Messages: 40
Registered: January 2002
Member
I am useing the following Statement: I am getting no records returned. Any idea what is wrong?
thanks again
Lance

Select count(User_name) users
from cp_license_use
where Time_Stamp between SYSDATE and (sysdate - 30/1440)
group by Time_stamp

To grab data from the following table: SYSDATE = 1/24/2002 9:33:16 PM
User_Name Time_stamp
dsilver 1/24/2002 9:31:33 PM
cnelson 1/24/2002 9:31:33 PM
eho 1/24/2002 9:31:33 PM
mreza 1/24/2002 9:31:33 PM
kjuneja 1/24/2002 9:31:33 PM
sislam 1/24/2002 9:31:33 PM
dkotha 1/24/2002 9:31:33 PM
mbalthrop 1/24/2002 9:31:33 PM
tchung 1/24/2002 9:31:33 PM
cnifong 1/24/2002 9:31:33 PM
sluc 1/24/2002 9:31:33 PM
dtrevino 1/24/2002 9:31:33 PM
ddobson 1/24/2002 9:31:33 PM
echinwub 1/24/2002 9:31:33 PM
dmoses 1/24/2002 9:31:33 PM
gpratt 1/24/2002 9:31:33 PM
syahmed 1/24/2002 9:31:33 PM
mreza 1/24/2002 9:31:33 PM
Re: time issue [message #37212 is a reply to message #37211] Thu, 24 January 2002 12:45 Go to previous message
Todd Barry
Messages: 4819
Registered: August 2001
Senior Member
You need to flip-flop the order of the times (the older datetime should be first):

where Time_Stamp between (sysdate - (30/1440)) and sysdate
Previous Topic: error
Next Topic: Fetch into array
Goto Forum:
  


Current Time: Thu Mar 28 17:47:53 CDT 2024