Home » SQL & PL/SQL » SQL & PL/SQL » Oracle query
Oracle query [message #203421] Wed, 15 November 2006 02:02 Go to next message
namrata_bhise
Messages: 18
Registered: October 2006
Location: mumbai
Junior Member
Hi,

SELECT count(*) FROM tpt_offering_action WHERE created_on BETWEEN TO_DATE('11/10/2006 19:50:00','MM/DD/YYYY HH24:MI:SS') AND SYSDATE+1

what is the exact meaning of the part of the query HH24:MI:SS or just give me what script will do?

Regards
Namrata
Re: Oracle query [message #203427 is a reply to message #203421] Wed, 15 November 2006 02:12 Go to previous messageGo to next message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
HH24:MI:SS is format mask for hours : minutes : seconds. If string which you use to represent date (and time) does not have/need time component, omit it. In that case, this query would be
SELECT count(*) 
FROM tpt_offering_action 
WHERE created_on BETWEEN TO_DATE('11/10/2006','MM/DD/YYYY') AND SYSDATE+1;

BTW, what do you mean by "give me what script will do"? Do what?
Re: Oracle query [message #203432 is a reply to message #203427] Wed, 15 November 2006 02:31 Go to previous messageGo to next message
namrata_bhise
Messages: 18
Registered: October 2006
Location: mumbai
Junior Member
Is the the script will select the row from 10Oct to todays date
Re: Oracle query [message #203436 is a reply to message #203432] Wed, 15 November 2006 02:39 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
No.
This script will select rows from the table tpt_offering_action where the value of created_on is between (7:50PM on 11th October 2006) and (this time tomorrow).
Re: Oracle query [message #203454 is a reply to message #203421] Wed, 15 November 2006 03:17 Go to previous messageGo to next message
namrata_bhise
Messages: 18
Registered: October 2006
Location: mumbai
Junior Member
Many Thanks
JRowbottom
Re: Oracle query [message #203540 is a reply to message #203436] Wed, 15 November 2006 08:09 Go to previous messageGo to next message
joy_division
Messages: 4644
Registered: February 2005
Location: East Coast USA
Senior Member
JRowbottom wrote on Wed, 15 November 2006 03:39
No.
This script will select rows from the table tpt_offering_action where the value of created_on is between (7:50PM on 11th October 2006) and (this time tomorrow).


Actually, the 10th of November according to OP format mask. You Europeans are just too comfortable using Day before Month Wink
Re: Oracle query [message #203555 is a reply to message #203540] Wed, 15 November 2006 09:01 Go to previous message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
True. Live would be so much easier if you colonials hadn't got things muddled up! Razz
Previous Topic: Oracle DBMS_LDAP SSL to 3rd Party LDAP Server
Next Topic: Propagate Exception between procedure and function
Goto Forum:
  


Current Time: Sat Dec 10 14:57:16 CST 2016

Total time taken to generate the page: 0.09936 seconds