PLS-00626: partitioned/clustered/ordered parameter must be a function argument Cause: A partitioning or clustering/ordering specification specified on an argument that is not one of the function arguments. Action: Specify partitioning/clustering/ordering based on the function ref-cursor formal argument.