جيتارا بتاريخ: 30 مارس 2011 تقديم بلاغ مشاركة بتاريخ: 30 مارس 2011 السلام عليكم قمت بكتابة كود لتحويل جملة select الى صيغة xml ولكن يظهر لى خطأ ora-00913 too many valuesوهاهو الكود... select xmlelement( "xml", xmlagg(xmlelement( "region", xmlattributes(p.area_id as "region"), xmlagg(xmlelement( "area_type", xmlattributes(p.area_type as "area_type"), (select xmlagg(xmlelement( "product", xmlattributes(c.name as "name", pr.description_arabic as "description"))), xmlagg(xmlelement( "customer_licenses", xmlattributes(cl.position_id as "pos_id", cl.area as "area", cl.description as "position", cl.start_date as "start_date", cl.end_date as "end_date", cl.notes as "notes"))) FROM customer_licenses cl LEFT JOIN positions p ON (cl.position_id=p.id) LEFT JOIN products pr ON (cl.product_type=pr.id) LEFT JOIN customers c ON(c.id=cl.cust_id) WHERE cl. license_type_id=4 and p.area_id IS NOT NULL AND p.area_type IS NOT NULL and p.id=cl.position_id group by cl.position_id ) ) ))))xml FROM positions pWHERE p.area_id IS NOT NULL AND p.area_type IS NOT NULLgroup by p.area_id ; ارجو المساعدة فى تصحيح الخطأ اقتباس رابط هذا التعليق شارك المزيد من خيارات المشاركة
Recommended Posts
انضم إلى المناقشة
يمكنك المشاركة الآن والتسجيل لاحقاً. إذا كان لديك حساب, سجل دخولك الآن لتقوم بالمشاركة من خلال حسابك.