This content has been marked as final.
Show 2 replies
-
1. Re: finder that checks for zero length parameter does not wo
raja05 Nov 9, 2003 6:49 PM (in response to davilch)Im not sure if you can use functions in a WHERE clause. Shouldnt it be easier to do the check in the Caller?
-Raj -
2. Re: finder that checks for zero length parameter does not wo
davilch Nov 10, 2003 10:34 AM (in response to davilch)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.