Unanswered: Stored Procedure Help - Private tickets
I have a complex Query for all.
I have an existing stored procedure developed in Oracle 9i.
This will return a set of rows using a Ref Cursor to the front end (asp.net page). That ref cursor uses some complex query.
Now my problem is,
That ref cursor returns a set of records to the front end.
Now my requirement is that, based on a condition (Some flag called private) a record in that set of records should display all the columns as "Private".
For example, if that refcursor gives five tickets t1,t2,t3,t4,t5 and
if t3 is private, then all the columns in that ticket t3 should show as private.
select (case when t3 = 'PRIVATE' then 'PRIVATE' else t1 end) as f1,
(case when t3 = 'PRIVATE' then 'PRIVATE' else t2 end) as f2,
where t3 != 'PRIVATE'
where t3 = 'PRIVATE'