procedure slc_list(p_tr IN OUT T_list, p_n_search_id in integer)is...
QSqlQuery query; QSqlQueryModel *model; query.prepare("CALL wfp_list.slc_list(?,?)"); query.bindValue("p_tr",QSql::InOut); query.bindValue("p_n_search_id", n_search_id, QSql::In); model->setQuery(query);
query.prepare("CALL wfp_kl_list.slc_kl_list(?,?)"); query.bindValue("p_tr",QSql::InOut); query.bindValue("p_n_search_id", n_search_id, QSql::In); model->setQuery(query);
query.prepare("CALL wfp_kl_list.slc_kl_list(?,?)"); query.bindValue("p_tr",QSql::InOut); query.bindValue("p_n_search_id", n_search_id, QSql::In);
void QSqlQuery::bindValue ( int pos, const QVariant & val, QSql::ParamType paramType = QSql::In )
procedure slc_kl_list(p_tr IN OUT T_kl_list,p_n_search_id in integer)is i binary_integer := 1; v_virzit wfp_main.r_amatpers;begin for c1 in ( select mat_id, numurs, datums_ieros, mat_status, stadija_kod from mat where nvl(archive_stat, '0') = '0' and mat_id in ( select id from buffer where n_search = p_n_search_id ) ) loop p_tr(i).mat_id :=c1.mat_id; p_tr(i).kl_numurs :=c1.numurs; p_tr(i).ieros :=c1.datums_ieros; p_tr(i).status_kod :=c1.mat_status; p_tr(i).stadija_kod :=c1.stadija_kod; --napravitel processa wfp_main.get_virzitajs(c1.mat_id, v_virzit); p_tr(i).iestade_kod := v_virzit.iestade_kod; p_tr(i).uzv := v_virzit.uzv; p_tr(i).var := v_virzit.var; p_tr(i).amats := v_virzit.amats; p_tr(i).kontakt := v_virzit.kontakt; --kvalificacija (spisok statej) p_tr(i).last_lem := wfp_main.get_mat_pants(c1.mat_id); i:=i+1; end loop; exception when OTHERS then raise_exception(gc_packet,'slc_kl_list');end;
create or replace function get_slc_kl_list(p_n_search_id in integer) RETURN T_kl_list PIPELINED ISv_list T_kl_list;BEGIN slc_kl_list(v_list, p_n_search_id); FOR i IN 1 .. v_list.count LOOP PIPE ROW(v_list(i)); END LOOP; RETURN;END;
select * from table(get_slc_kl_list(:p_n_search_id));