user defined function

The following restriction has been mentioned in the oracle documentation while invoking an user defined function from an sql expression:
•It must be a row function, not a column (group) function; that is, its argument cannot be an entire column.

Can somebody please explain this with an example? How can the entire column be passed as an argument to an user defined function?

Thanks in advance.
Who is Participating?
I'm not sure what you mean?

That is exactly what I'm trying say.

you can ONLY pass an entire column to a function if that function is an aggregate.
and, when you do that,  it's implicit, the aggregate knows how to process the column
aggregates,  like MAX, MIN, AVG  work on a column for all rows in a group
as opposed to something like  TO_CHAR  which works on the value within a single row
subratocAuthor Commented:
Hi sdstuber,
Thanks for your responses but can you please explain this in the context of an user defined function?
MAX, MIN, AVG  are aggregate functions predefined by oracle but
on reading the documenation "argument cannot be an entire column" I was wondering
how can the entire column be passed as an argument to an user defined function?

e.g. I run the query,

select col1, fn_user_def(col1) from tab1;

No problems. I am passing the value of col1 here for every row to the function fn_user_def.
But how is it possible to pass the entire column to fn_user_def
as if I am calling "fn_user_def(entire_column_parameter)"?
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.