الانتقال إلى المحتوى
View in the app

A better way to browse. Learn more.

مجموعة مستخدمي أوراكل العربية

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

ممكن المساعده في حل هذا السؤال

Featured Replies

بتاريخ:

[DEPT COURSE# PRE_ PRE_COURSE#
---- ---------- ---- -----------
CS 432 CS 240
CS 532 CS 432
Math 314 Math 221
CS 432 Math 314
CS 552 CS 240

5. Write a procedure in your package that, for a given course (with dept_code and course# as parameters), can return all its prerequisite courses (show dept_code and course# together as in CS532), including both direct and indirect prerequisite courses.
If course C1 has course C2 as a prerequisite, C2 is a direct prerequisite.
If C2 has course C3 has a prerequisite, then C3 is an indirect prerequisite.
Indirect prerequisites can be more than two levels away.

بتاريخ:
  • كاتب الموضوع

No answer?
Anyway thanks . I solve it. and I will post my solution for general benefit.
and it's working.

set serveroutput on set echo on create or replace procedure show_pre
(deptc in courses.dept_code%type,cour# in courses.course#%type)
is 
cursor c2 is
select (p1.pre_dept_code||p1.pre_course#) as CID
from prerequisites p1 where p1.dept_code=deptc and p1.course#=cour#;

begin for c2_rec in c2 loop
 dbms_output.put_line(c2_rec.CID);


declare
	cursor c3 is
       	select (p2.pre_dept_code||p2.pre_course#) as CID
       	from prerequisites p2 where (p2.dept_code||p2.course#)=c2_rec.CID;	
begin for c3_rec in c3 loop
	dbms_output.put_line(c3_rec.CID);
	end loop;
end;

end loop;
end;
/
show errors

exec show_pre('CS',432);





Salam Alakoum
Samer

انضم إلى المناقشة

يمكنك المشاركة الآن والتسجيل لاحقاً. إذا كان لديك حساب, سجل دخولك الآن لتقوم بالمشاركة من خلال حسابك.

زائر
أضف رد على هذا الموضوع...

برجاء الإنتباه

بإستخدامك للموقع فأنت تتعهد بالموافقة على هذه البنود: سياسة الخصوصية

Account

Navigation

البحث

إعداد إشعارات المتصفح الفورية

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.