November 22, 2007
Am I stupid, or is Oracle?

The story is this. We have to make a change to one of our data migration scripts. It's already doing some really nasty string manipulation, and we are about to make it far far worse. Frankly, I don't have a hope of making the change unless we can simplify things a bit first, so I was hoping to break some of our string manipulation out into functions.

In order to do that, we wanted to develop these functions out of the context of the migration script, so we could play with, uh, I mean test them. ;-)

Problem is, the finest minds in Herbal Hill haven't been able to write a function that Oracle is happy with. We have removed all the complex stuff, and are trying to write and run the simplest function that we can think of, but we get no joy. Running the broken_function.sql, we get this:

ORA-06550: line 11, column 13:
PLS-00231: function 'FOO' may not be used in SQL
ORA-06550: line 11, column 13:
PL/SQL: ORA-00904: : invalid identifier
ORA-06550: line 11, column 6:
PL/SQL: SQL Statement ignored
06550. 00000 - "line %s, column %s:\n%s"
*Cause: Usually a PL/SQL compilation error.

Any clues?

Posted to Software development by Simon Brunning at November 22, 2007 11:38 AM
Post a comment

Email Address:



Remember info?