Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Typed Ref Cursor for Crystal Report

Status
Not open for further replies.

bobhagan

MIS
Apr 28, 2001
111
US
I've seen several questions about this that refer to a Crystal White paper. The example uses

TYPE REFCURSOR cursorblah RETURN basetable%ROWTYPE;

and then SELECTS * from that table.

I'm using Oracle 8i and CR.NET. I need to SELECT some fields from a parent table and then a set of dates from one field in a second table:

SELECT C.CLIENT_NM, C.CLIENT_ID, C.ADDRESS,
Max(decode(substr(S.STATUS, 1,2), 'N-', S.STATUS_DT, null)) "LastRefer_Dt",
Max(decode(s.status, 'O', s.status_dt, null)) "LastOpen_Dt",
etc.

I presume you have to assign %TYPE to each field, inluding the calculated fields, but I can't quite get it to work.
Can anybody explain this or show me a good example?

Thanks
Bob Hagan



 
It appears I need to create a view, and run the stored procedure on that.

Bob Hagan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top