بتاريخ: 17 نوفمبر 201213 سنة comment_229207 السلام عليكم ورحمة الله وبركاتهwe need a query which display the following output form tables emp,dept dept 10 emp1 emp2 dept 20 emp3 emp4 meaning first display the department then displays the employee belonging to this department (using hierarchical retneval) indicate the level on each row as a column of the result.وجزاكم الله خيرا تقديم بلاغ
بتاريخ: 27 نوفمبر 201213 سنة كاتب الموضوع comment_229502 ايه يا جماعه هو محدش رد علي السؤال ليه تقديم بلاغ
بتاريخ: 27 نوفمبر 201213 سنة comment_229543 السلام عليكم ورحمة الله وبركاتهالإستعلام (مطبق على scott): with employees as ( select deptno , dname||' :' dname , -1 dn from dept union select empno , ename , deptno dn from emp ) select lpad(' ', level*3)||dname "Employees" from employees connect by prior deptno = dn start with dn = -1 النتيجة: Employees --------------- ACCOUNTING : CLARK KING MILLER RESEARCH : SMITH JONES FORD SALES : ALLEN WARD MARTIN BLAKE TURNER JAMES بالتوفيق تم تعديل 27 نوفمبر 201213 سنة بواسطة az123 تقديم بلاغ
بتاريخ: 28 نوفمبر 201213 سنة كاتب الموضوع comment_229554 السلام عليكم ورحمة الله وبركاتهالإستعلام (مطبق على scott): with employees as ( select deptno , dname||' :' dname , -1 dn from dept union select empno , ename , deptno dn from emp ) select lpad(' ', level*3)||dname "Employees" from employees connect by prior deptno = dn start with dn = -1 النتيجة: Employees --------------- ACCOUNTING : CLARK KING MILLER RESEARCH : SMITH JONES FORD SALES : ALLEN WARD MARTIN BLAKE TURNER JAMES بالتوفيق جزاك الله كل خير وجعله في ميزان حسناتك ممكن شرح للاستعلام وشكرا جزيلا تقديم بلاغ
انضم إلى المناقشة
يمكنك المشاركة الآن والتسجيل لاحقاً. إذا كان لديك حساب, سجل دخولك الآن لتقوم بالمشاركة من خلال حسابك.