I have a reporting system, using 8i as the database. I have been asked to create a report that concatenates some of the data from multiple rows into a single row, as follows
Assume two tables with the following data:
The desired end result is:
I understand how to do this in a stored procedure, using a temp table and cursor, saving the results to a table that is used to populate the report. What I would like to know, is there any way to do this without having to have the intermediate steps?
I am constrained by the fact that our reporting system (COGNOS Impromptu) has no way for me to call a procedure - I'd like to be able to do this in a view, or some other Oracle object, if possible.
I understand that this is a long shot, and any and all information is appreciated.
Sam
Assume two tables with the following data:
Code:
Table_a
case id name address
1 123 J. Blow 111 Daisy Ave
2 321 J. Smith 222 Magnolia
Table_b
case absence_type start_date end_date
1 leave 1/1/04 2/1/04
1 STD 2/1/04 3/1/04
2 STD 1/1/04 4/1/04
The desired end result is:
Code:
Case ID Name Absence Summary
1 123 J. Blow Leave 1/1/04-2/1/04, STD 2/1/04-3/1/04
2 321 J. Smith STD 1/1/04-4/1/04
I understand how to do this in a stored procedure, using a temp table and cursor, saving the results to a table that is used to populate the report. What I would like to know, is there any way to do this without having to have the intermediate steps?
I am constrained by the fact that our reporting system (COGNOS Impromptu) has no way for me to call a procedure - I'd like to be able to do this in a view, or some other Oracle object, if possible.
I understand that this is a long shot, and any and all information is appreciated.
Sam