Oracle Pass-through Query

ianlee74

New member
Local time
Today, 04:59
Joined
Jan 14, 2009
Messages
2
The following query works fine in TOAD for Oracle, but it will not work as a pass-through query in Access. Does anyone know what I need to do to make this work from Access? Specifically, I cannot figure out how to get the final resultset returned to Access.

Code:
[FONT=Courier][SIZE=2]
var outCursor refcursor;
 
declare 
vInvoiceID SPHRSBILLING.WORK_UNIT.invoice_id%type; -- number;
vStart sphrsbilling.work_unit.tat_ends_on%type; --date;
vEndBefore sphrsbilling.work_unit.tat_ends_on%type; --date;
 
begin
 
select invoice_id, bill_period_start, bill_period_end_before
into vInvoiceID, vStart, vEndBefore
from sphrsbilling.latest_invoice
where invoice_grp_id in ( select default_invoice_grp_id
from sphrsbilling.ext_client
where ext_client_key = '73-0');

 
open :outCursor for 
SELECT wu.WORK_UNIT_ID, wu.DICTATOR_ID
FROM SPHRSBILLING.WORK_UNIT wu
WHERE wu.EXT_SYS = 'TWS38'
and wu.invoice_id = vInvoiceID
and wu.tat_ends_on >= vStart
and wu.tat_ends_on < vEndBefore;
end; 
 
print outCursor;
[/SIZE][/FONT]
 

Users who are viewing this thread

Back
Top Bottom