Hi Matt,
I have a context menu SQL query which is fairly large (see below), when I try to apply changes to this I get the above error. If I remove one of the Union Alls (e.g. menu_id 4) it's all OK. It seems I'm hitting a query size limit, but surprised that LONGs are being referenced. Any ideas?
Thanks
Alan
select * from (select * from (
with comment_id as (select forecast_comment_id
from gcf_forecast_comment where reporting_name=:P50_CONTEXT_REPORTING_NAME and solution_set=:P50_CONTEXT_SOLUTION_SET
and solution_detail=:P50_CONTEXT_SOLUTION_DETAIL and fiscal_year=:P50_FORECAST_YEAR)
select -1 menu_id,null menu_pid, 'Edit comments for '|| :P50_CONTEXT_SOLUTION_DETAIL text,
'f?p='||:APP_ID||':115:'||:APP_SESSION||'::'||:DEBUG||'::P115_FORECAST_COMMENT_ID:'||forecast_comment_id url
,0 display_seq,'fx-icon page-white-text' css_class ,'View existing comments for this solution' info,null custom from comment_id
union all
select 0 menu_id,null menu_pid, 'Add new comments for '||:P50_CONTEXT_SOLUTION_DETAIL text,
'f?p='||:APP_ID||':115:'||:APP_SESSION||'::'||:DEBUG||'::P115_FORECAST_COMMENT_ID,P115_REPORTING_NAME,P115_SOLUTION_SET,P115_SOLUTION_DETAIL,P115_FISCAL_YEAR,P115_JAN_COMMENT,P115_FEB_COMMENT,P115_MAR_COMMENT,P115_APR_COMMENT,P115_MAY_COMMENT,P115_JUN_COMMENT,P115_JUL_COMMENT,P115_AUG_COMMENT,P115_SEP_COMMENT,P115_OCT_COMMENT,P115_NOV_COMMENT,P115_DEC_COMMENT:'||NULL||','||:P50_CONTEXT_REPORTING_NAME||','|| :P50_CONTEXT_SOLUTION_SET||','||:P50_CONTEXT_SOLUTION_DETAIL||','||:P50_FORECAST_YEAR||','||NULL||','||NULL||','||NULL||','||NULL||','||NULL||','||NULL||','||NULL||','||NULL||','||NULL||','||NULL||','||NULL||','||NULL url
,0 display_seq,'fx-icon page-white-text' css_class ,'Create new comments for this solution' info,null custom from dual
order by display_seq)) where rownum=1
union all
select 1 menu_id,null menu_pid,
'Dec: '||dec_comment text,
NULL url,
--'f?p='||:APP_ID||':115:'||:APP_SESSION||'::'||:DEBUG||'::P115_FORECAST_COMMENT_ID:'||forecast_comment_id url,
1 display_seq,'fx-icon page-white-text' css_class ,'View existing comments for this solution' info,null custom
from gcf_forecast_comment where reporting_name=:P50_CONTEXT_REPORTING_NAME and solution_set=:P50_CONTEXT_SOLUTION_SET
and solution_detail=:P50_CONTEXT_SOLUTION_DETAIL and fiscal_year=:P50_FORECAST_YEAR and dec_comment is not null
union all
select 2 menu_id,null menu_pid,
'Nov: '||nov_comment text,
NULL url,
--'f?p='||:APP_ID||':115:'||:APP_SESSION||'::'||:DEBUG||'::P115_FORECAST_COMMENT_ID:'||forecast_comment_id url,
1 display_seq,'fx-icon page-white-text' css_class ,'View existing comments for this solution' info,null custom
from gcf_forecast_comment where reporting_name=:P50_CONTEXT_REPORTING_NAME and solution_set=:P50_CONTEXT_SOLUTION_SET
and solution_detail=:P50_CONTEXT_SOLUTION_DETAIL and fiscal_year=:P50_FORECAST_YEAR and nov_comment is not null
union all
select 3 menu_id,null menu_pid,
'Oct: '||oct_comment text,
NULL url,
--'f?p='||:APP_ID||':115:'||:APP_SESSION||'::'||:DEBUG||'::P115_FORECAST_COMMENT_ID:'||forecast_comment_id url,
1 display_seq,'fx-icon page-white-text' css_class ,'View existing comments for this solution' info,null custom
from gcf_forecast_comment where reporting_name=:P50_CONTEXT_REPORTING_NAME and solution_set=:P50_CONTEXT_SOLUTION_SET
and solution_detail=:P50_CONTEXT_SOLUTION_DETAIL and fiscal_year=:P50_FORECAST_YEAR and oct_comment is not null
union all
select 4 menu_id,null menu_pid,
'Sep: '||sep_comment text,
NULL url,
--'f?p='||:APP_ID||':115:'||:APP_SESSION||'::'||:DEBUG||'::P115_FORECAST_COMMENT_ID:'||forecast_comment_id url,
1 display_seq,'fx-icon page-white-text' css_class ,'View existing comments for this solution' info,null custom
from gcf_forecast_comment where reporting_name=:P50_CONTEXT_REPORTING_NAME and solution_set=:P50_CONTEXT_SOLUTION_SET
and solution_detail=:P50_CONTEXT_SOLUTION_DETAIL and fiscal_year=:P50_FORECAST_YEAR and sep_comment is not null
union all
select * from (
with rbo_changes_log as (select distinct id,event_date from gcf_forecast_calc_log_text
where reporting_nme=:P50_CONTEXT_REPORTING_NAME and solution_set=:P50_CONTEXT_SOLUTION_SET order by id desc)
select id menu_id,null menu_pid, 'View log for ' || to_char(event_date,'DD-MON-YYYY HH24:MI:SS') text,
apex_util.prepare_url('f?p='||:APP_ID||':110:'||:APP_SESSION||'::'||:DEBUG||'::P110_LOG_ID:'||id) url
,rownum display_seq,'fx-icon pencil' css_class ,null info,null custom from rbo_changes_log)