HELP with embedded SQL (pro*C)
Date: Tue, 18 Jan 1994 06:57:49 GMT
Message-ID: <1994Jan18.065749.28528_at_frodo.cc.flinders.edu.au>
I was just wondering if it is possible to use views in embedded SQL.I have looked through the oracle pro*C user's guide and nothing is mentioned about views in there.
What I want to do is query two tables to get the day and time of a given tutorial( in the tut_booking table) and the starting time from another(tutorial table)
EXEC SQL create view time_ckeck as
select distinct t_day,t_time,start_date
from tut_booking,tutorial
where stud_id = reg_num
and tut_booking.tcode = tutorial.tcode; -- join condition
then against this I want to check the current student and the tutorial that he/she wants to enroll in and check against the view to see if there is a clash in time and day
EXEC SQL select count(*)
into :temp5 from time_check where t_day =:tday1 and t_time =:ttime1 and start_date =:date1; if (temp5 != 0) error(3);
It seems when I run my entire program the view creation does not work, even though it works properly when I create the view in sqlplus.
All help will be appreciated.
Matthew Carr.
Received on Tue Jan 18 1994 - 07:57:49 CET