part of your problem is that boolean is not valid where you are trying to use it.
You cant do select boolean_function(param) from dual It just will not work. You can IIRC use it in a where or having clause (as part of a condition) but since it is not legal to have a column that is type boolean it is not legal to select it. Basically that is a good rule of thumb to go by. If you have a type that you cannot use as the type of a column then you cannot select it. Not the answer that you wanted to hear I am sure but ... What you will often see is a function that returns 0,1,null or -1, 1, null or 'T', 'F', null in lieu of being able to use the actual type boolean. Hopefully helpful mwmann wrote: > Hi > > Please can someone help me out. I have done quite a bit of searching > and 'trial and error' without much success. > I have simplified the problem for readability, but a solution to this > will allow me to solve my problem. > > PROBLEM: > I have a table BATCH_FUNCTION which will contain records with various > existing DB functions, with parameters- (Return Type BOOLEAN). > > In an Anonymous Block (lets say for example), if I had a list of the > functions to call in a cursor (select function_name from > batch_function), how would I call these functions with parameters, as > well as be able to test the Return value in my Anonymous block? > > I presume that Dynamic SQL is the way to go, but I have not been able > to get it right. > > > ----------------------------------------------------------------------------------------------------------- > EXAMPLE TABLE: BATCH_FUNCTION > ----------------------------------------------------------------------------------------------------------- > func_id function_name > ----------- --------------------- > 111 test_positive(1) > > > > ----------------------------------------------------------------------------------------------------------- > EXAMPLE FUNCTION > ----------------------------------------------------------------------------------------------------------- > FUNCTION test_positive(i_number IN NUMBER) RETURN BOOLEAN AS > BEGIN > if(i_number >0) THEN > RETURN true; > else > RETURN false; > end if; > END test_positive; > > > > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Oracle PL/SQL" group. To post to this group, send email to Oracle-PLSQL@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/Oracle-PLSQL?hl=en -~----------~----~----~----~------~----~------~--~---