Hoping someone can help...
I have a stored proc I'm writing (part of a package, actually) that will return a number of records. Within the results, there are two types of records, which must be handled differently but appear on the same report. The cursor is returned and dumped to an excel file for accounting type to check over.
I have approached this by creating a cursor in the procedure that reads the record data, and examines a series of data items, including a currency value, in the record to determine if the record should count towards one total or the other. What I want to do is return two separate curency fields in the cursor record, with one or the other filled depending on how the evaluation goes.
Unfortunately, it appears from the texts I have that if you want to return a cursor with different fields from the ones originally supplied by the initial query, you need to have a separate table in the DB and run specific insert statements to write the cursor data out. I would prefer not to have to create a dedicated table for this, and just return the cursor so it can get dumped into Excel.
Can anyone suggest a path as to how I can di this without a new dedicated table in my DB?
Thanks
CraigHartz
I have a stored proc I'm writing (part of a package, actually) that will return a number of records. Within the results, there are two types of records, which must be handled differently but appear on the same report. The cursor is returned and dumped to an excel file for accounting type to check over.
I have approached this by creating a cursor in the procedure that reads the record data, and examines a series of data items, including a currency value, in the record to determine if the record should count towards one total or the other. What I want to do is return two separate curency fields in the cursor record, with one or the other filled depending on how the evaluation goes.
Unfortunately, it appears from the texts I have that if you want to return a cursor with different fields from the ones originally supplied by the initial query, you need to have a separate table in the DB and run specific insert statements to write the cursor data out. I would prefer not to have to create a dedicated table for this, and just return the cursor so it can get dumped into Excel.
Can anyone suggest a path as to how I can di this without a new dedicated table in my DB?
Thanks
CraigHartz