Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

SQL to select data between a date range

421660May 19 2004 — edited Oct 26 2004
Hello,

I am a new user to HTMLDB and I have an application where I need to select the rows from a table that are between a specified date range. The table description is

name varchar2
class varchar2
sal number
hdate date

I want to select the rows of all names between date value 1 and date value 2. The SQL query I use in SQLPLUS does not work in HTML DB. The query I used is

select null link, name from tab_data where hdate between TO_DATE('06-JAN-04','DD-MON-YY') and TO_DATE('08-JAN-04','DD-MON-YY')

I also have 2 date picker fields in my form and I used a similar query which did not work.
-
select null link, name from tab_data where hdate between TO_DATE(:P2_DATE1,'DD-MON-YY') and TO_DATE(:P2_DATE2,'DD-MON-YY').

Can someone help me out?

Thanks


Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 23 2004
Added on May 19 2004
12 comments
1,091 views