Invalid host/bind variable name ORA-01745
Posted: Thu 16 Feb 2017 17:33
While updating a old application I get "invalid host/bind variable name" for a query
When trying to work with TOraQuery.
If I change ":Date" to something else, ":Dat" everything is fine.
The problem is probably the fact the "Date" is a reserved word, but in this case, only as a parameter.
And yes (long explanation, but) simply changing to ":Dat" will take (almost) forever.
Code: Select all
select Pot, count(*) value
from Pots
WHERE Pot BETWEEN :PotFrom AND :PotTo
and Dt >= ( :Date -10 )
and Dt < (:Date + 1)
Group by Pot
If I change ":Date" to something else, ":Dat" everything is fine.
The problem is probably the fact the "Date" is a reserved word, but in this case, only as a parameter.
And yes (long explanation, but) simply changing to ":Dat" will take (almost) forever.