Using stored functions in SQL WHERE clauses
Date: 14 Nov 94 15:11:58 GMT
Message-ID: <jodle.784825918_at_BIX.com>
I am maintaining some PL/SQL code that was migrated from Oracle 5->6->7
and contains a mixture of VARCHAR and fixed-length CHAR fields. This is
creating some difficulty since most of my queries involve at least one
condition that looks like "RPAD(field,len) = value". My chief concern is
maintainability since the decision was made to incrementally migrate the
database from mostly VARCHAR to mixed VARCHAR and CHAR fields.
I would like to store a function to use for all text field equality
conditions and while I have successfully stored such a function and can
access it elsewhere, SQLPlus balks at calling it from a where clause. I
am beginning to think this cannot be done, though all documentation I've
consulted is ambiguous about which functions can be called this way.
Can anyone suggest a way to do this or an alternative?