Validation Procedures/DB LINK [message #257536] |
Wed, 08 August 2007 10:15 |
marco76
Messages: 2 Registered: August 2007 Location: NJ
|
Junior Member |
|
|
Hi all,
I am trying to create a validation procedure that reads data from an Oracle Clinical dataset and then makes modifications in another database.
I have managed to get the script to execute outside of OC in TOAD and it was successful.
This is in my Declaration code
type refcur is ref cursor;
sSql long;
CURSOR curPatients IS
Select PT, S.NO_YES, S.VISIT
from responsest
where S.NO_YES = 'Y'
and S.VISIT is NOT NULL;
This is in my PRE-DETAILS:
PT_NUM := RXCPDSTD.PATIENTS_REC.PATIENT_POSITION_ID;
OPEN curPatients;
LOOP --on patient
FETCH curPatients INTO pt_num, SCRN_FAIL, VISIT_FAIL;
EXIT WHEN curPatients%NOTFOUND;
-- get app_id from imaging
Select app_id
into napp_id
from application@crfprod
where APP_LONG_DESC LIKE 'IMG001%';
END LOOP;--on patient
dbms_output.put_line( NAPP_ID);
It all compiles successfully, then it runs, but it does not update the other database. I cut out most of the details and stripped it down to something basic.
I set it up so if the napp_id gets a value back, that a discrepancy is generated with that value. So far it only comes back as <blank>.
Any suggestions?
[Updated on: Wed, 08 August 2007 14:05] Report message to a moderator
|
|
|
|
|
|
|