kamel220371 بتاريخ: 21 ديسمبر 2005 تقديم بلاغ مشاركة بتاريخ: 21 ديسمبر 2005 essalam this is my first participation in this famous web-sit ,i'd like write with arabic language but my system doesn't recognized it well, i want describe this methodforexample: select count(*) from empresult only filed of this table 'EMP'execute this line for some tables, so, you need to create procedure or function for execute them,but there is another method, here it is..DECLARECURSOR cur_tab ( v_param1 varchar2 ) IS SELECT table_name,column_name FROM user_tab_columns WHERE table_name IN (SELECT table_name FROM tabs) AND column_name LIKE v_param1||'%' ; SQL_ORDER VARCHAR2(400);vl_param1 VARCHAR2(50):=('&1');vl_param2 VARCHAR2(50):=('&2');vl_count NUMBER;BEGINOPEN cur_tab( v_param1 => vl_param1); LOOP FETCH cur_tab INTO vl_table,vl_column; EXIT WHEN cur_tab%notfound; SQL_ORDER := ' SELECT COUNT(*) FROM ' || vl_table || ' WHERE '||vl_column||'= '||''''||vl_param2||''''; execute IMMEDIATE vl_ordre_sql INTO vl_count ; dbms_output.put_line (vl_count); END LOOP; CLOSE cur_tab; END--------------------------------------------------------this my e_mail [email protected]i'm here i can help you; اقتباس رابط هذا التعليق شارك المزيد من خيارات المشاركة
Recommended Posts
انضم إلى المناقشة
يمكنك المشاركة الآن والتسجيل لاحقاً. إذا كان لديك حساب, سجل دخولك الآن لتقوم بالمشاركة من خلال حسابك.