我正在使用HPQC / ALM 11.00版,并且我想编写一条sql语句,以获取每个运行ID所通过,失败,阻止等的步骤数。
我试图编写一个for循环,但是查询生成器抛出“ Quality Center无法运行查询,因为它包含无效的语句”
select runids in (select rn_run_id from run)
loop
select r.rn_run_id from run r where r.rn_run_id = runids.rn.run_id
end loop;
db type = oracle
答案 0 :(得分:0)
您需要将runids
定义为驾驶查询的光标变量。同样,内部SELECT必须分配给变量。像这样:
for runids in (select rn_run_id from run)
loop
select r.rn_run_id
into l_run_id
from run r
where r.rn_run_id = runids.rn.run_id;
end loop;