Suppose I have an SQL function called MAGIC that returns the magic value of a number.
Suppose I want to write an SQL query that returns a list of numbers from an SQL table along with their magic values.
My instinct is to write
SELECT number, MAGIC(number) FROM NUMBERS;
However, this returns the error message "MAGIC is not a recognized function name. How can I make this work?
EDIT: It looks like MAGIC is set up for a table function, even if it returns only one value. My database administrator will not give me access to the entire functional code of the database, so I have to work with it this way.
source share