is it possible to use scalar function in the where and order by clause?
If not which one will be the appropriate place to use the function?
eg: select acct-num
where (substr(location-code,6,1)=2)
Scalar functions can be executed in the select list of the SQL SELECT statement or as part of a WHERE or HAVING clause.