Debsy23
asked on
UNI STUDENT NEEDS HELP! - POST-CHANGE TRIGGER
This will be an easy one for any experts!
I am doing a project on Oracle at uni and only have basic knowledge of Oracle.
I want to retrieve data into 3 display items from one code.
Ie: I have a clinic code and have created 3 display items for clinic_description, start_time and end_time.
How do I write the PL/SQL for the trigger to display all data in one go? I only know how to display it for one item.
So far it looks like this:
select clinic_description
into :clinic_appoint.clinic_des cription
from clinic
where :clinic_appoint.clinic_cod e=clinic.c linic_code ;
I need the start_time & end_time to display in the clinic_appoint form as well.
Thanks!
I am doing a project on Oracle at uni and only have basic knowledge of Oracle.
I want to retrieve data into 3 display items from one code.
Ie: I have a clinic code and have created 3 display items for clinic_description, start_time and end_time.
How do I write the PL/SQL for the trigger to display all data in one go? I only know how to display it for one item.
So far it looks like this:
select clinic_description
into :clinic_appoint.clinic_des
from clinic
where :clinic_appoint.clinic_cod
I need the start_time & end_time to display in the clinic_appoint form as well.
Thanks!
hi debsy23,
if the suggestion I proposed helped you and u are satisfied with it, could u please accept my comment and close this question
thanks,
vemul
if the suggestion I proposed helped you and u are satisfied with it, could u please accept my comment and close this question
thanks,
vemul
ASKER
Sorry vemul for not accepting the answer yet, it is only because I can't get it to work yet. All the info was stored in the same table 'clinic' so when I changed it to suit, it looked like this:
select clinic_description, start_time, end_time
into :clinic_appoint.clinic_des cription,
:clinic_appoint.start_time ,
:clinic_appoint.end_time,
from clinic
where :clinic_appoint.clinic_cod e=clinic.c linic_code ;
It says that there is a problem with 'from'. I have tried variations.
select clinic_description, start_time, end_time
into :clinic_appoint.clinic_des
:clinic_appoint.start_time
:clinic_appoint.end_time,
from clinic
where :clinic_appoint.clinic_cod
It says that there is a problem with 'from'. I have tried variations.
what exactly did it say the problem was?. also can I presume clinic_description, start_time, stop_time are in the same table clinic?
ASKER
Yes, they are all in the same table. It said 'encountered the symbol 'from' when expecting one of the following... mod <an identifier><a double-quoted delimited-identifier><a bind-variable>current sql<a single-quoted sql string>
The symbol "<an identifier>" was substituted for FROM to continue.
Which didn't give me much insight I am afraid.
The symbol "<an identifier>" was substituted for FROM to continue.
Which didn't give me much insight I am afraid.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks so much Vemul - its such a small change, but makes all the difference.
it was actually my mistake but glad we got it figured out..
good luck
vemul
good luck
vemul
u would do something like
select clinic_description, start_time, end_time
into :clinic_appoint.clinic_des
:clinic_appoint.start_time
:clinic_appoint.end_time,
from clinic, tableX
where :clinic_appoint.clinic_cod
and :clinic_appoint.clinic_cod
hope u get the idea
vemul