Oracle Apex Flash Chart not displaying label -
i building stacked column 3d flash chart in oracle apex. based on pl/sql returning sql query. pl/sql required capture types of properties , count number of instances in database connected properties. code :
declare l_qry varchar2(32767); v_id number; v_resort varchar2(80); begin l_qry := 'select ''fp=&app_id.:802::app_session::::p5_search_month:''||to_char(e.enquired_date,''mon-yy'')||'':'' link,'; l_qry := l_qry || ''' ''||to_char(e.enquired_date,''mon-yy'')||'':'' label,'; --loop through resorts , add sum(decode...) column column alias r1 in (select distinct a.resort_id enquiry a, resort b a.resort_id not null , a.resort_id = b.id , b.active =1) loop select name v_resort resort id = r1.resort_id; what happens plsql loping through resorts , counts them. solution work degree after value returned want have label name of resort taken v_resort. main difficulty is
l_qry := l_qry || 'sum(decode(resort_id,''' || r1.resort_id ||''',1,0)) test,'; l_qry := l_qry || 'sum(decode(resort_id,''' || r1.resort_id ||''',1,0)) '|| v_resort||','; first line display 'test' label when hover on columns fine. the second 1 '|| v_resort ||' cause issue not displaying results... not giving #no_data_found# message blank field.. rest of code :
end loop; --trim off trailing comma l_qry := rtrim(l_qry, ','); --append rest of query l_qry := l_qry || ' enquiry e,resort r e.enquiry_type=''availr'' , e.enquiry_channel '''||:p5_channel||''' , trunc(e.created) >= '''||:p5_date_from||''' , trunc(e.created) <= '''||:p5_date_to||''' , e.enquired_date > '''||:p5_date_from||''' , ((nvl(:p5_available,''a'')=''a'') or ('''||:p5_available||'''=available)) , e.resort_id = r.id , ((resort_id = '''||:p6_resort||''') or ('''||:p6_resort||''' ''0'')) group to_char(enquired_date,''mon-yy''),to_char(enquired_date,''yymm'') order to_char(enquired_date,''yymm'')'; return(l_qry); end; i tired '|| v_resort ||' , '''||v_resort||''' . other ideas how create value of label taken v_resort holds resort name ?
try "'||v_resort||'"
have use quoted identifier since v_resort can string , there many rules unquoted names.
Comments
Post a Comment