Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to return boolean from PL/SQL expression in "table.column"

franklin.jrMar 9 2016 — edited Mar 10 2016

I have a table, and one of its columns has PL/SQL instructions which always returns boolean.

For example: (say it comes from "INSTRUCTIONS.perform_this" table.column)

"BEGIN if 1 = 1 then return TRUE; else return FALSE; END;"

At this moment I am unable to run an instruction which takes the string above and returns its result into a boolean variable - that is, via "execute immediate returning into boolean". Every time I try to directly run it, I receive an error message, stating that a procedure cannot contain a return statement. The only thing I could do until now is replacing "return TRUE" and "return FALSE" with a bind variable, but I think there could be a better solution.

Your help will be greatly appreciated.

This post has been answered by Paulzip on Mar 9 2016
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 7 2016
Added on Mar 9 2016
16 comments
8,286 views