Skip to Main Content

SQL & PL/SQL

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!

<Solved> Date Parameter / Date Bind Variable Syntax

636161May 6 2008 — edited May 29 2008
I'll preface this with the same statement I usually do when I post on this forum; I am T-SQL native and I am trying to rewire by brain to work with Oracle and PL/SQL.
Anyway, I am writing a report with a date parameter to be used with BI Publisher. I'm just not sure that my syntax is correct in my where clause. Can someone please tell me if this looks right?
WHERE (EFFECTIVE_DATE >= :startdate And EFFECTIVE_DATE <= :enddate)
or do I need to use the To_Date function in a way something like this?
WHERE (EFFECTIVE_DATE >= TO_DATE('&startdate','mm/dd/yyyy') And EFFECTIVE_DATE <= TO_DATE('&enddate','mm/dd/yyyy'))

Thanks,
David
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 26 2008
Added on May 6 2008
19 comments
8,021 views