Skip to Main Content

SQL Developer

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!

Cannot pass a Date parameter into a script without modifying the script to treat this parameter properly

Oleksandr Nikonov15 hours ago

I have a parametrized SQL script which I check inside SQL Developer time to time.

Let's say the script contains …WHERE TABLE.FROMDATE > TRUNC(:FROMDATE) part.

It works fine, because the script is usually run via code, which sends those parameters to DbCommand with the correct data type.

Each time the script changes, I want to copy-paste the script “as is” without adapting it for SQL Developer and verify / troubleshoot it. The problem is that there is no way to supply a data type for a parameter in SQL Developer and I am getting

ORA-00932: inconsistent datatypes: expected DATE got NUMBER

error. So I need to global-replace all occurences of :FROMDATE with TO_DATE(:FROMDATE).

Comments
Post Details
Added 15 hours ago
0 comments
8 views