Hi Philipp,
the answer here is "you cannot use keywords as parameter names".
It's simply not supported, even though the documentation doesn't have an explicit dis-support note for this case, it is mentioned, that using words from the reserved word list is not recommended.
Also, from a design perspective, "FROM" and "TO" are not really great choices for parameter names.
Why not go for something semantically more expressive?
Like "BEGIN_DATE" and "END_DATE"? Or even better "LEASE_BEGIN_DATE" (if it is about leases, that is
)
This would not only tell the user of the function which data type to expect, but also what the meaning of the parameter is without forcing the user to check your procedure code.
- Lars