بتاريخ: 2 أغسطس 200817 سنة comment_134848 الاخوة الزملاء السلام عليكم ورحمة الله وبركاتهاقوم بعمل جمع فيلد من 7 جداولمع العلم السنة والشهر forign_keyوعند عمل الربط بهذه الطريقه يحدث cartsieanفما الحلهل outer_joinأو veiow?????حيث ان المطلوب قائمة جدوليه بالشهور لهذه السنة وامامها مجموع كل عنصر خلال هذا الشهر وهكذا في بقية الشهور===== SELECT m.acc_tear_year_code, m.month_code, SUM (NVL (arri_value, 0)) arri, SUM (NVL (des_value, 0)) desi, SUM (NVL (gene_value, 0)) gener, SUM (NVL (tttt_value, 0)) tot, SUM (NVL (phn_price, 0) * NVL (satae, 0)) state, SUM (NVL (no_st_emp_day, 0)) employees FROM acc_months m, acc_arri v, acc_desi d, acc_gener g, acc_tttt c, acc_phn h, acc_move z WHERE m.acc_tear_year_code = v.acc_tear_year_code AND m.month_code = v.acc_month_month_code AND m.acc_tear_year_code = d.acc_tear_year_code AND m.month_code = d.acc_month_month_code AND m.acc_tear_year_code = g.acc_tear_year_code AND m.month_code = g.acc_month_month_code AND m.acc_tear_year_code = c.acc_tear_year_code AND m.month_code = c.acc_month_month_code AND m.acc_tear_year_code = h.year_code AND m.month_code = h.month_code AND m.acc_tear_year_code = z.acc_tear_year_code AND m.month_code = z.acc_month_month_code GROUP BY m.acc_tear_year_code, m.month_code; تقديم بلاغ
بتاريخ: 3 أغسطس 200817 سنة كاتب الموضوع comment_134898 الاخوة الزملاء السلام عليكم ورحمة الله وبركاتهاقوم بعمل جمع فيلد من 7 جداولمع العلم السنة والشهر forign_keyوعند عمل الربط بهذه الطريقه يحدث cartsieanفما الحلهل outer_joinأو veiow?????حيث ان المطلوب قائمة جدوليه بالشهور لهذه السنة وامامها مجموع كل عنصر خلال هذا الشهر وهكذا في بقية الشهور=====SELECT m.acc_tear_year_code, m.month_code, SUM (NVL (arri_value, 0)) arri, SUM (NVL (des_value, 0)) desi, SUM (NVL (gene_value, 0)) gener, SUM (NVL (tttt_value, 0)) tot, SUM (NVL (phn_price, 0) * NVL (satae, 0)) state, SUM (NVL (no_st_emp_day, 0)) employees FROM acc_months m, acc_arri v, acc_desi d, acc_gener g, acc_tttt c, acc_phn h, acc_move z WHERE m.acc_tear_year_code = v.acc_tear_year_code AND m.month_code = v.acc_month_month_code AND m.acc_tear_year_code = d.acc_tear_year_code AND m.month_code = d.acc_month_month_code AND m.acc_tear_year_code = g.acc_tear_year_code AND m.month_code = g.acc_month_month_code AND m.acc_tear_year_code = c.acc_tear_year_code AND m.month_code = c.acc_month_month_code AND m.acc_tear_year_code = h.year_code AND m.month_code = h.month_code AND m.acc_tear_year_code = z.acc_tear_year_code AND m.month_code = z.acc_month_month_code GROUP BY m.acc_tear_year_code, m.month_code; اين الردود يا شباب تقديم بلاغ
بتاريخ: 3 أغسطس 200817 سنة comment_134936 i think you have to recheck the foreign keys for each table for example are you sure that the foreign in table employess is the year and month only plz send the structure of the tables you joined تقديم بلاغ
انضم إلى المناقشة
يمكنك المشاركة الآن والتسجيل لاحقاً. إذا كان لديك حساب, سجل دخولك الآن لتقوم بالمشاركة من خلال حسابك.