Im not sure if you can use functions in a WHERE clause. Shouldnt it be easier to do the check in the Caller?
You could check the parameter prior to calling the sql but that won't scale well. The scenario I have in mind is where there would be multiple parameters to the sql, any or all of which might be null/empty. I would like to have only one sql statement that could handle any combination. This is an easy thing to do in oracle pl/sql. Not so much in ejb-ql.
Functions are legal in a WHERE clause and I am sure that if I was checking the length of a column that it would work fine. Just trying to get some insight as to whether what I am trying to do should or should not work.