Now that I think about it, you might want to switch the return datatype to number 0,1 instead of boolean. The SQL might complain otherwise.