在form中,给数据块查询追加新的where语句
app_query.append('块名',user_where_clause);
user_where_clause 为varchar2类型,写上你需要加的sql语句。
DECLARE
temp_clause VARCHAR2(1000);
BEGIN
app_folder.event('PRE-QUERY');
lines_folder_c.pre_query;
IF :parameter.cux_query_find = 'Y' AND
:find.q_price IS NOT NULL THEN
temp_clause := 'EXISTS (select 1
from po_headers_all poh
where 1=1
AND po_lines_inq_v.po_header_id =POH.po_header_id
AND poh.ATTRIBUTE2 =''' ||
name_in('FIND.Q_PRICE') || ''')';
app_query.append('LINES_FOLDER', temp_clause);
END IF;
--End add
EXCEPTION
WHEN OTHERS THEN
:parameter.cux_query_find := 'N';
po_message_c.show;
RAISE form_trigger_failure;
END;