بتاريخ: 6 نوفمبر 200916 سنة comment_175680 يا جماعة من فضلكم عايزة حل للسؤال الاتي ضروري جدا:The HR department needs a list of countries that have no departments located in them. Display the country ID and the name of the countries؟ لقد وجدت حل سابق في المنتدى ولكن ليس المطلوب لاني عايزة الحل ماخود من 3 جداولcountriescountry_idcountry_namelocationslocation_idlocation_namecountry_iddepartmentsdepartment_iddepartment_namelocation_idولكم جزيل الشكر تقديم بلاغ
بتاريخ: 7 نوفمبر 200916 سنة كاتب الموضوع comment_175770 يعني انا عندي 3 جداول (COUNTRIES -DEPATMENTS -LOCATIONS) كل جدول يحتوي على الاعمدة الموضحة بالاعلى فانا اريد ولان جدول الدول لا يمكن ربطه مع جدول الاقسام الا باستخدام جدول المواقع فحيكون في لفة في الحل واسفة اذا ما قدرت اوضح اكترشكرا تم تعديل 7 نوفمبر 200916 سنة بواسطة oracle energy تقديم بلاغ
بتاريخ: 8 نوفمبر 200916 سنة comment_175796 أخي العزيز ...يا ريت التوضيح ما الذي تريد بالضبط فإذا أردت الربط بين الجداول .. فإليك جملة Select التالية : SELECT c.country_id, c.country_name, l.location_id, l.location_name, d.department_id, d.department_nameFROM country c , location l , department d WHERE c.country_id = l.country_id AND l.location_id = d.location_idأرجو تجربة الجملة السابقة . تقديم بلاغ
بتاريخ: 8 نوفمبر 200916 سنة comment_175816 واحد من الحلول تأكدي من الاخطاء الاملائيه select c.country_id, c.country_name, from country c where c.country_id not in ( select distinct l.country_id from locations l where l.location_id in ( select distinct d.location_id from departments d ) ) تقديم بلاغ
بتاريخ: 9 نوفمبر 200916 سنة كاتب الموضوع comment_175986 اخواني السلام عليكم المراد من السؤال هو استرجاع اسماء وارقام الدول التي لا تحتوي على اقسام(DEPARTMENTS) وهذه هي الجداولcountriescountry_idcountry_namelocationslocation_idlocation_namecountry_iddepartmentsdepartment_iddepartment_namelocation_idفجدول الاقسام لا يحتوي على country_id وهنا الفكرة في السؤال فسيتم الربط بين الجدولين باستخدام الجدول الثالث وهو جدول المواقع بواسطة (location_id)وأعتذر ان كنت قد اسات ايصال الفكرة تقديم بلاغ
بتاريخ: 9 نوفمبر 200916 سنة comment_176006 السلام عليكم أتمنى أن يكون هذا ماتريد select country_id,country_name from countries where country_id in (( select country_id from locations left outer join departments on (locations.location_id =departments.location_id) minus select country_id from locations ,departments where (locations.location_id =departments.location_id)) ; وفقك الله تقديم بلاغ
انضم إلى المناقشة
يمكنك المشاركة الآن والتسجيل لاحقاً. إذا كان لديك حساب, سجل دخولك الآن لتقوم بالمشاركة من خلال حسابك.