日期:2014-05-17 浏览次数:20754 次
CREATE OR REPLACE
PROCEDURE BUILDCOUNT (
b_defaultnum in NUMBER,
b_num in NUMBER,
b_id in VARCHAR2,
b_typeid in VARCHAR2,
b_super_typeid in VARCHAR2,
b_hierarchy in VARCHAR2,
b_name in VARCHAR2,--查询变量
b_tempnum in NUMBER,--父级值
qz_etail_id in VARCHAR2,--用户权重标示ID
fieldname in VARCHAR2--字段名
)
AS
--t_build VARCHAR2(20);
plsql VARCHAR2(200);
v_name VARCHAR2(20);
cursor t_build is
select * from RENT_BUILD where fieldname =''''||b_name||'''';
BEGIN
v_name:=b_name;
plsql:='select * from RENT_BUILD where '||fieldname||'='''||b_name||'''';
--Execute Immediate plsql;
dbms_output.put_line(plsql);
for res in t_build loop
dbms_output.put_line(res.buildid);
-- updateBuild(res.buildid,b_num,qz_etail_id,b_name,b_tempnum,b_defaultnum,fieldname);
end loop;
dbms_output.put_line(' 影响的行数: '||sql%rowcount||'字段名:'||fieldname);
commit;
END;