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).