Ok, got it working as SQL. My select now looks like this:
STRAGG (DISTINCT LOCATION),
STRAGG (DISTINCT AREA),
STRAGG (DISTINCT DISTRICT)
GROUP BY JOB_ID.
Problem I have is that this does not seem to work inside a PL/SQL Block. I get the error
ORA-06550: line 15, column 47:
PL/SQL: ORA-30482: DISTINCT option not allowed for this function
ORA-06550: line 12, column 4:
PL/SQL: SQL Statement ignored
Is there a different way to do the distinct? I thought maybe inside the ODCIAGGREGATEMERGE
function, but I could not figure out how.
Followup July 28, 2003 - 10am Central time zone:
Interesting, looks like a "product issue" to me. use a dynamically opened ref cursor as a
variable x refcursor
open l_cursor for '
STRAGG (DISTINCT LOCATION) l,
STRAGG (DISTINCT AREA) a,
STRAGG (DISTINCT DISTRICT) d
GROUP BY JOB_ID';