PL/SQL problem with too many lines - can not apply changes

I have a complex PL/SQL that requires checking 90 check boxes and the query works to a certain point then it just stops being able to be saved (apply changes) after a high no. of lines has been typed in. (The PL/SQL query is to check against a file, that the file has all the check boxes as yes. If there is only 1 or 2 boxes checked, then the sql created only checks those 2 fields for yes.) Is there a way to increase the coding space (or number of lines) that APEX can save/use.

This is the whole PL/SQL coding. At this point, we cannot add any more lines or it will come up with "web page cannot be found" message.
declare
q varchar2(32767); -- query
new varchar2(1):='Y'; -- first one
begin
q := 'select a."CONTR_ID", a."NAME", b."PHONE_NO", b."EMAIL_ADDR" FROM contractor a, contacts b where a.contr_id = b.contr_id and a.contr_id not in (Select unique a."CONTR_ID" from contractor a, contractor_competency b where a."CONTR_ID" = b."CONTR_ID" ';
-------------------Start ENV
if :P33_AIR_QUALITY_TESTING = 'YES' then
if new = 'Y' then q := q || ' and ('; new := 'N';
else q := q || ' or '; end if;
q := q || '(instr(upper(b."JOB"),upper(''Air Quality Testing'')) > 0) and
((instr(upper(b."SET_YES_NO"),''NO'') > 0) or
(instr(upper(b."CRAFTMAN_YES_NO"),''NO'') > 0) and
(instr(upper(b."PROBATION_YES_NO"),''NO'') > 0)) ';
end if;
if :P33_ASBESTOS_REMOVAL_DEEN = 'YES' then
if new = 'Y' then q := q || ' and ('; new := 'N';
else q := q || ' or '; end if;
q := q || '(instr(upper(b."JOB"),upper(''Asbestos Removal De-Energized'')) > 0) and
((instr(upper(b."SET_YES_NO"),''NO'') > 0) or
(instr(upper(b."CRAFTMAN_YES_NO"),''NO'') > 0) and
(instr(upper(b."PROBATION_YES_NO"),''NO'') > 0)) ';
end if;
if :P33_ASBESTOS_REMOVAL_ENER = 'YES' then
if new = 'Y' then q := q || ' and ('; new := 'N';
else q := q || ' or '; end if;
q := q || '(instr(upper(b."JOB"),upper(''Asbestos Removal Energized'')) > 0) and
((instr(upper(b."SET_YES_NO"),''NO'') > 0) or
(instr(upper(b."CRAFTMAN_YES_NO"),''NO'') > 0) and
(instr(upper(b."PROBATION_YES_NO"),''NO'') > 0)) ';
end if;
if :P33_BUILDING_ASBESTOS_REMOVAL = 'YES' then
if new = 'Y' then q := q || ' and ('; new := 'N';
else q := q || ' or '; end if;
q := q || '(instr(upper(b."JOB"),upper(''Building Asbestos Removal'')) > 0) and
((instr(upper(b."SET_YES_NO"),''NO'') > 0) or
(instr(upper(b."CRAFTMAN_YES_NO"),''NO'') > 0) and
(instr(upper(b."PROBATION_YES_NO"),''NO'') > 0)) ';
end if;
if :P33_ENVIRONMENTAL_CONSULTING = 'YES' then
if new = 'Y' then q := q || ' and ('; new := 'N';
else q := q || ' or '; end if;
q := q || '(instr(upper(b."JOB"),upper(''Environmental Consulting'')) > 0) and
((instr(upper(b."SET_YES_NO"),''NO'') > 0) or
(instr(upper(b."CRAFTMAN_YES_NO"),''NO'') > 0) and
(instr(upper(b."PROBATION_YES_NO"),''NO'') > 0)) ';
end if;
if :P33_MANHOLE_ASBESTOS_REM_DEEN = 'YES' then
if new = 'Y' then q := q || ' and ('; new := 'N';
else q := q || ' or '; end if;
q := q || '(instr(upper(b."JOB"),upper(''Manhole Asbestos Removal De-Energized'')) > 0) and
((instr(upper(b."SET_YES_NO"),''NO'') > 0) or
(instr(upper(b."CRAFTMAN_YES_NO"),''NO'') > 0) and
(instr(upper(b."PROBATION_YES_NO"),''NO'') > 0)) ';
end if;
if :P33_MANHOLE_ASBESTOS_REM_ENER = 'YES' then
if new = 'Y' then q := q || ' and ('; new := 'N';
else q := q || ' or '; end if;
q := q || '(instr(upper(b."JOB"),upper(''Manhole Asbestos Removal Energized'')) > 0) and
((instr(upper(b."SET_YES_NO"),''NO'') > 0) or
(instr(upper(b."CRAFTMAN_YES_NO"),''NO'') > 0) and
(instr(upper(b."PROBATION_YES_NO"),''NO'') > 0)) ';
end if;
if :P33_OIL_FILTERING = 'YES' then
if new = 'Y' then q := q || ' and (';
new := 'N';
else
q := q || ' or '; end if;
q := q || '(instr(upper(b."JOB"),upper(''Oil Filtering'')) > 0) and
((instr(upper(b."SET_YES_NO"),''NO'') > 0) or
(instr(upper(b."CRAFTMAN_YES_NO"),''NO'') > 0) and
(instr(upper(b."PROBATION_YES_NO"),''NO'') > 0)) ';
end if;
if :P33_OIL_SAMPLING = 'YES' then
if new = 'Y' then q := q || ' and (';
new := 'N';
else
q := q || ' or '; end if;
q := q || '(instr(upper(b."JOB"),upper(''Oil Sampling'')) > 0) and
((instr(upper(b."SET_YES_NO"),''NO'') > 0) or
(instr(upper(b."CRAFTMAN_YES_NO"),''NO'') > 0) and
(instr(upper(b."PROBATION_YES_NO"),''NO'') > 0)) ';
end if;
if :P33_OIL_SPILL_CLEANUP = 'YES' then
if new = 'Y' then q := q || ' and (';
new := 'N';
else
q := q || ' or '; end if;
q := q || '(instr(upper(b."JOB"),upper(''Oil Spill Cleanup'')) > 0) and
((instr(upper(b."SET_YES_NO"),''NO'') > 0) or
(instr(upper(b."CRAFTMAN_YES_NO"),''NO'') > 0) and
(instr(upper(b."PROBATION_YES_NO"),''NO'') > 0)) ';
end if;
if :P33_PUMPING_OUT_MANHOLES = 'YES' then
if new = 'Y' then q := q || ' and (';
new := 'N';
else
q := q || ' or '; end if;
q := q || '(instr(upper(b."JOB"),upper(''Pumping Out Manholes'')) > 0) and
((instr(upper(b."SET_YES_NO"),''NO'') > 0) or
(instr(upper(b."CRAFTMAN_YES_NO"),''NO'') > 0) and
(instr(upper(b."PROBATION_YES_NO"),''NO'') > 0)) ';
end if;
if :P33_SIGNED_ENVIRO_DOCS = 'YES' then
if new = 'Y' then q := q || ' and (';
new := 'N';
else
q := q || ' or '; end if;
q := q || '(instr(upper(b."JOB"),upper(''Signed Enviro Docs PRO-MS-008'')) > 0) and
((instr(upper(b."SET_YES_NO"),''NO'') > 0) or
(instr(upper(b."CRAFTMAN_YES_NO"),''NO'') > 0) and
(instr(upper(b."PROBATION_YES_NO"),''NO'') > 0)) ';
end if;
if :P33_TRANSPORTATION_OF_D_GOODS = 'YES' then
if new = 'Y' then q := q || ' and (';
new := 'N';
else
q := q || ' or '; end if;
q := q || '(instr(upper(b."JOB"),upper(''Transportation of Dangerous Goods'')) > 0) and
((instr(upper(b."SET_YES_NO"),''NO'') > 0) or
(instr(upper(b."CRAFTMAN_YES_NO"),''NO'') > 0) and
(instr(upper(b."PROBATION_YES_NO"),''NO'') > 0)) ';
end if;
if :P33_TRANSPORTATION_OF_PCB = 'YES' then
if new = 'Y' then q := q || ' and (';
new := 'N';
else
q := q || ' or '; end if;
q := q || '(instr(upper(b."JOB"),upper(''Transportation of PCB'')) > 0) and
((instr(upper(b."SET_YES_NO"),''NO'') > 0) or
(instr(upper(b."CRAFTMAN_YES_NO"),''NO'') > 0) and
(instr(upper(b."PROBATION_YES_NO"),''NO'') > 0)) ';
end if;
if :P33_WASTE_PICK_UP = 'YES' then
if new = 'Y' then q := q || ' and (';
new := 'N';
else
q := q || ' or '; end if;
q := q || '(instr(upper(b."JOB"),upper(''Waste Pick-Up'')) > 0) and
((instr(upper(b."SET_YES_NO"),''NO'') > 0) or
(instr(upper(b."CRAFTMAN_YES_NO"),''NO'') > 0) and
(instr(upper(b."PROBATION_YES_NO"),''NO'') > 0)) ';
end if;
-------------------- start OCM
if :P33_GREENFIELD_POLELINE_CONST = 'YES' then
if new = 'Y' then q := q || ' and (';
new := 'N';
else
q := q || ' or '; end if;
q := q || '(instr(upper(b."JOB"),upper(''Greenfield Poleline Construction'')) > 0) and
((instr(upper(b."SET_YES_NO"),''NO'') > 0) or
(instr(upper(b."CRAFTMAN_YES_NO"),''NO'') > 0) and
(instr(upper(b."PROBATION_YES_NO"),''NO'') > 0)) ';
end if;
if :P33_HV_OVERHEAD_MAINTENANCE = 'YES' then
if new = 'Y' then q := q || ' and (';
new := 'N';
else
q := q || ' or '; end if;
q := q || '(instr(upper(b."JOB"),upper(''HV Overhead Maintenance'')) > 0) and
((instr(upper(b."SET_YES_NO"),''NO'') > 0) or
(instr(upper(b."CRAFTMAN_YES_NO"),''NO'') > 0) and
(instr(upper(b."PROBATION_YES_NO"),''NO'') > 0)) ';
end if;
if :P33_INSULATOR_WARNING = 'YES' then
if new = 'Y' then q := q || ' and (';
new := 'N';
else
q := q || ' or '; end if;
q := q || '(instr(upper(b."JOB"),upper(''Insulator Warning'')) > 0) and
((instr(upper(b."SET_YES_NO"),''NO'') > 0) or
(instr(upper(b."CRAFTMAN_YES_NO"),''NO'') > 0) and
(instr(upper(b."PROBATION_YES_NO"),''NO'') > 0)) ';
end if;
if :P33_LV_OVERHEAD_MAINTENANCE = 'YES' then
if new = 'Y' then q := q || ' and (';
new := 'N';
else
q := q || ' or '; end if;
q := q || '(instr(upper(b."JOB"),upper(''LV Overhead Maintenance'')) > 0) and
((instr(upper(b."SET_YES_NO"),''NO'') > 0) or
(instr(upper(b."CRAFTMAN_YES_NO"),''NO'') > 0) and
(instr(upper(b."PROBATION_YES_NO"),''NO'') > 0)) ';
end if;
if :P33_OVERHEAD_INFRARED_SCAN = 'YES' then
if new = 'Y' then q := q || ' and ('; new := 'N';
else
q := q || ' or '; end if;
q := q || '(instr(upper(b."JOB"),upper(''Overhead Infrared Scanning'')) > 0) and
((instr(upper(b."SET_YES_NO"),''NO'') > 0) or
(instr(upper(b."CRAFTMAN_YES_NO"),''NO'') > 0) and
(instr(upper(b."PROBATION_YES_NO"),''NO'') > 0)) ';
end if;
if :P33_POLEHOLES_AND_ANCHORS = 'YES' then
if new = 'Y' then q := q || ' and ('; new := 'N';
else
q := q || ' or '; end if;
q := q || ' (instr(upper(b."JOB"),upper(''Poleholes and Anchors'')) > 0) and
((instr(upper(b."SET_YES_NO"),''NO'') > 0) or
(instr(upper(b."CRAFTMAN_YES_NO"),''NO'') > 0) and
(instr(upper(b."PROBATION_YES_NO"),''NO'') > 0)) ';
end if;
if :P33_POLELINE_INSPECTION = 'YES' then
if new = 'Y' then q := q || ' and( '; new := 'N';
else
q := q || ' or '; end if;
q := q || ' (instr(upper(b."JOB"),upper(''Poleline Inspection'')) > 0) and
((instr(upper(b."SET_YES_NO"),''NO'') > 0) or
(instr(upper(b."CRAFTMAN_YES_NO"),''NO'') > 0) and
(instr(upper(b."PROBATION_YES_NO"),''NO'') > 0)) ';
end if;
if :P33_POLELINE_WORK_TO_35KV = 'YES' then
if new = 'Y' then q := q || ' and ('; new := 'N';
else
q := q || ' or '; end if;
q := q || ' (instr(upper(b."JOB"),upper(''Poleline Work to 35KV'')) > 0) and
((instr(upper(b."SET_YES_NO"),''NO'') > 0) or
(instr(upper(b."CRAFTMAN_YES_NO"),''NO'') > 0) and
(instr(upper(b."PROBATION_YES_NO"),''NO'') > 0)) ';
end if;
if :P33_POLELINE_TO_44KV = 'YES' then
if new = 'Y' then q := q || ' and ('; new := 'N';
else
q := q || ' or '; end if;
q := q || ' (instr(upper(b."JOB"),upper(''Poleline to 44KV'')) > 0) and
((instr(upper(b."SET_YES_NO"),''NO'') > 0) or
(instr(upper(b."CRAFTMAN_YES_NO"),''NO'') > 0) and
(instr(upper(b."PROBATION_YES_NO"),''NO'') > 0)) ';
end if;
if :P33_ROCK_DRILLING = 'YES' then
if new = 'Y' then q := q || ' and ('; new := 'N';
else
q := q || ' or '; end if;
q := q || '(instr(upper(b."JOB"),upper(''Rock Drilling'')) > 0) and
((instr(upper(b."SET_YES_NO"),''NO'') > 0) or
(instr(upper(b."CRAFTMAN_YES_NO"),''NO'') > 0) and
(instr(upper(b."PROBATION_YES_NO"),''NO'') > 0)) ';
end if;
if :P33_TENSION_STRINGING = 'YES' then
if new = 'Y' then q := q || ' and ('; new := 'N';
else
q := q || ' or '; end if;
q := q || ' (instr(upper(b."JOB"),upper(''Tension Stringing'')) > 0) and
((instr(upper(b."SET_YES_NO"),''NO'') > 0) or
(instr(upper(b."CRAFTMAN_YES_NO"),''NO'') > 0) and
(instr(upper(b."PROBATION_YES_NO"),''NO'') > 0)) ';
end if;
if :P33_TREE_TRIMMING_DEEN = 'YES' then
if new = 'Y' then q := q || ' and ('; new := 'N';
else
q := q || ' or '; end if;
q := q || '(instr(upper(b."JOB"),upper(''Tree Trimming (De-Energized)'')) > 0) and
((instr(upper(b."SET_YES_NO"),''NO'') > 0) or
(instr(upper(b."CRAFTMAN_YES_NO"),''NO'') > 0) and
(instr(upper(b."PROBATION_YES_NO"),''NO'') > 0)) ';
end if;
if :P33_TREE_TRIMMING_ENER = 'YES' then
if new = 'Y' then q := q || ' and ('; new := 'N';
else
q := q || ' or '; end if;
q := q || '(instr(upper(b."JOB"),upper(''Tree Trimming (Energized)'')) > 0) and
((instr(upper(b."SET_YES_NO"),''NO'') > 0) or
(instr(upper(b."CRAFTMAN_YES_NO"),''NO'') > 0) and
(instr(upper(b."PROBATION_YES_NO"),''NO'') > 0)) ';
end if;
if :P33_WOOD_POLE_TESTING_DEEN = 'YES' then
if new = 'Y' then q := q || ' and ('; new := 'N';
else
q := q || ' or '; end if;
q := q || '(instr(upper(b."JOB"),upper(''Wood Pole Testing De-Energized'')) > 0) and
((instr(upper(b."SET_YES_NO"),''NO'') > 0) or
(instr(upper(b."CRAFTMAN_YES_NO"),''NO'') > 0) and
(instr(upper(b."PROBATION_YES_NO"),''NO'') > 0)) ';
end if;
if :P33_WOOD_POLE_TESTING_ENER = 'YES' then
if new = 'Y' then q := q || ' and ('; new := 'N';
else
q := q || ' or '; end if;
q := q || '(instr(upper(b."JOB"),upper(''Wood Pole Testing Energized'')) > 0) and
((instr(upper(b."SET_YES_NO"),''NO'') > 0) or
(instr(upper(b."CRAFTMAN_YES_NO"),''NO'') > 0) and
(instr(upper(b."PROBATION_YES_NO"),''NO'') > 0)) ';
end if;
------------------ start UCM
if :P33_CO2_CLEANING = 'YES' then
if new = 'Y' then q := q || ' and ('; new := 'N';
else
q := q || ' or '; end if;
q := q || '(instr(upper(b."JOB"),upper(''CO2 Cleaning'')) > 0) and
((instr(upper(b."SET_YES_NO"),''NO'') > 0) or
(instr(upper(b."CRAFTMAN_YES_NO"),''NO'') > 0) and
(instr(upper(b."PROBATION_YES_NO"),''NO'') > 0)) ';
end if;
if :P33_CABLE_PULLING = 'YES' then
if new = 'Y' then q := q || ' and ('; new := 'N';
else
q := q || ' or '; end if;
q := q || '(instr(upper(b."JOB"),upper(''Cable Pulling'')) > 0) and
((instr(upper(b."SET_YES_NO"),''NO'') > 0) or
(instr(upper(b."CRAFTMAN_YES_NO"),''NO'') > 0) and
(instr(upper(b."PROBATION_YES_NO"),''NO'') > 0)) ';
end if;
if :P33_CABLE_TESTING_DEENERGIZED = 'YES' then
if new = 'Y' then q := q || ' and ('; new := 'N';
else
q := q || ' or '; end if;
q := q || '(instr(upper(b."JOB"),upper(''Cable Testing De-Energized'')) > 0) and
((instr(upper(b."SET_YES_NO"),''NO'') > 0) or
(instr(upper(b."CRAFTMAN_YES_NO"),''NO'') > 0) and
(instr(upper(b."PROBATION_YES_NO"),''NO'') > 0)) ';
end if;
if :P33_CABLE_TESTING_ENERGIZED = 'YES' then
if new = 'Y' then q := q || ' and ('; new := 'N';
else
q := q || ' or '; end if;
q := q || '(instr(upper(b."JOB"),upper(''Cable Testing Energized'')) > 0) and
((instr(upper(b."SET_YES_NO"),''NO'') > 0) or
(instr(upper(b."CRAFTMAN_YES_NO"),''NO'') > 0) and
(instr(upper(b."PROBATION_YES_NO"),''NO'') > 0)) ';
end if;
if :P33_CONC_DUCT_MAN_DEEN = 'YES' then
if new = 'Y' then q := q || ' and ('; new := 'N';
else
q := q || ' or '; end if;
q := q || '(instr(upper(b."JOB"),upper(''Conc. Duct & Manhole (De-Energized)'')) > 0) and
((instr(upper(b."SET_YES_NO"),''NO'') > 0) or
(instr(upper(b."CRAFTMAN_YES_NO"),''NO'') > 0) and
(instr(upper(b."PROBATION_YES_NO"),''NO'') > 0)) ';
end if;
if :P33_CONC_DUCT_MAN_ENER = 'YES' then
if new = 'Y' then q := q || ' and ('; new := 'N';
else
q := q || ' or '; end if;
q := q || '(instr(upper(b."JOB"),upper(''Conc. Duct & Manhole (Energized)'')) > 0) and
((instr(upper(b."SET_YES_NO"),''NO'') > 0) or
(instr(upper(b."CRAFTMAN_YES_NO"),''NO'') > 0) and
(instr(upper(b."PROBATION_YES_NO"),''NO'') > 0)) ';
end if;
if :P33_DIR_BURIED_DUCT_DEEN = 'YES' then
if new = 'Y' then q := q || ' and ('; new := 'N';
else
q := q || ' or '; end if;
q := q || '(instr(upper(b."JOB"),upper(''Direct Buried (De-Energized)'')) > 0) and
((instr(upper(b."SET_YES_NO"),''NO'') > 0) or
(instr(upper(b."CRAFTMAN_YES_NO"),''NO'') > 0) and
(instr(upper(b."PROBATION_YES_NO"),''NO'') > 0)) ';
end if;
if :P33_DIR_BURIED_DUCT_ENER = 'YES' then
if new = 'Y' then q := q || ' and ('; new := 'N';
else
q := q || ' or '; end if;
q := q || '(instr(upper(b."JOB"),upper(''Direct Buried (Energized)'')) > 0) and
((instr(upper(b."SET_YES_NO"),''NO'') > 0) or
(instr(upper(b."CRAFTMAN_YES_NO"),''NO'') > 0) and
(instr(upper(b."PROBATION_YES_NO"),''NO'') > 0)) ';
end if;
if :P33_DIRECTIONAL_BORING_DEEN = 'YES' then
if new = 'Y' then q := q || ' and ('; new := 'N';
else
q := q || ' or '; end if;
q := q || '(instr(upper(b."JOB"),upper(''Directional Boring De-Energized'')) > 0) and
((instr(upper(b."SET_YES_NO"),''NO'') > 0) or
(instr(upper(b."CRAFTMAN_YES_NO"),''NO'') > 0) and
(instr(upper(b."PROBATION_YES_NO"),''NO'') > 0)) ';
end if;
if :P33_DIRECTIONAL_BORING_ENER = 'YES' then
if new = 'Y' then q := q || ' and ('; new := 'N';
else
q := q || ' or '; end if;
q := q || '(instr(upper(b."JOB"),upper(''Directional Boring Energized'')) > 0) and
(instr(upper(b.”SET_YES_NO”),''NO'') > 0) ';
end if;
if :P33_GENERAL_EXCAVATION = 'YES' then
if new = 'Y' then q := q || ' and ('; new := 'N';
else
q := q || ' or '; end if;
q := q || '(instr(upper(b."JOB"),upper(''General Excavation Around Plant'')) > 0) and
(instr(upper(b.”SET_YES_NO”),''NO'') > 0) ';
end if;
if :P33_HV_UG_MAINTENANCE = 'YES' then
if new = 'Y' then q := q || ' and ('; new := 'N';
else
q := q || ' or '; end if;
q := q || '(instr(upper(b."JOB"),upper(''HV Underground Maintenance'')) > 0) and
(instr(upper(b.”SET_YES_NO”),''NO'') > 0) ';
end if;
if :P33_LV_UG_MAINTENANCE = 'YES' then
if new = 'Y' then q := q || ' and ('; new := 'N';
else
q := q || ' or '; end if;
q := q || '(instr(upper(b."JOB"),upper(''LV Underground Maintenance'')) > 0) and
(instr(upper(b.”SET_YES_NO”),''NO'') > 0) ';
end if;
if :P33_MANHOLE_CLEANING_DEEN = 'YES' then
if new = 'Y' then q := q || ' and ('; new := 'N';
else
q := q || ' or '; end if;
q := q || '(instr(upper(b."JOB"),upper(''Manhole Cleaning De-Energized'')) > 0) and
(instr(upper(b.”SET_YES_NO”),''NO'') > 0) ';
end if;
if :P33_MANHOLE_CLEANING_ENER = 'YES' then
if new = 'Y' then q := q || ' and ('; new := 'N';
else
q := q || ' or '; end if;
q := q || '(instr(upper(b."JOB"),upper(''Manhole Cleaning Energized'')) > 0) and
(instr(upper(b.”SET_YES_NO”),''NO'') > 0) ';
end if;
if :P33_MANHOLE_INSPECTION = 'YES' then
if new = 'Y' then q := q || ' and ('; new := 'N';
else
q := q || ' or '; end if;
q := q || '(instr(upper(b."JOB"),upper(''Manhole Inspection'')) > 0) and
(instr(upper(b.”SET_YES_NO”),''NO'') > 0) ';
end if;
if :P33_UG_EQUIPMENT_INSPECTIONS = 'YES' then
if new = 'Y' then q := q || ' and ('; new := 'N';
else
q := q || ' or '; end if;
q := q || '(instr(upper(b."JOB"),upper(''UG Equipment Inspections'')) > 0) and
(instr(upper(b.”SET_YES_NO”),''NO'') > 0) ';
end if;
if :P33_UG_INFRA_RED_SCANNING = 'YES' then
if new = 'Y' then q := q || ' and ('; new := 'N';
else
q := q || ' or '; end if;
q := q || '(instr(upper(b."JOB"),upper(''UG Infra Red Scanning'')) > 0) and
(instr(upper(b.”SET_YES_NO”),''NO'') > 0) ';
end if;
if :P33_UG_CABLE_LOCATES = 'YES' then
if new = 'Y' then q := q || ' and ('; new := 'N';
else
q := q || ' or '; end if;
q := q || '(instr(upper(b."JOB"),upper(''Underground Cable Locates'')) > 0) and
(instr(upper(b.”SET_YES_NO”),''NO'') > 0) ';
end if;
------------------------ start SCM
if :P33_FENCING_AROUND_SUBSTATION = 'YES' then
if new = 'Y' then q := q || ' and ('; new := 'N';
else
q := q || ' or '; end if;
q := q || '(instr(upper(b."JOB"),upper(''Fencing Around Substation'')) > 0) and
(instr(upper(b.”SET_YES_NO”),''NO'') > 0) ';
end if;
if :P33_FENCING_GREENFIELD = 'YES' then
if new = 'Y' then q := q || ' and ('; new := 'N';
else
q := q || ' or '; end if;
q := q || '(instr(upper(b."JOB"),upper(''Fencing Greenfield'')) > 0) and
(instr(upper(b.”SET_YES_NO”),''NO'') > 0) ';
end if;
if :P33_INSPECTION_AND_TESTING = 'YES' then
if new = 'Y' then q := q || ' and ('; new := 'N';
else
q := q || ' or '; end if;
q := q || '(instr(upper(b."JOB"),upper(''Inspection And Testing'')) > 0) and
(instr(upper(b.”SET_YES_NO”),''NO'') > 0) ';
end if;
if :P33_STATION_CIVIL_WORK = 'YES' then
if new = 'Y' then q := q || ' and ('; new := 'N';
else
q := q || ' or '; end if;
q := q || '(instr(upper(b."JOB"),upper(''Station Civil Work'')) > 0) and
(instr(upper(b.”SET_YES_NO”),''NO'') > 0) ';
end if;
if :P33_STATION_CONST_DEENERGIZED = 'YES' then
if new = 'Y' then q := q || ' and ('; new := 'N';
else
q := q || ' or '; end if;
q := q || '(instr(upper(b."JOB"),upper(''Station Construction (De'')) > 0) and
(instr(upper(b.”SET_YES_NO”),''NO'') > 0) ';
end if;
if :P33_STATION_CONST_ENERGIZED = 'YES' then
if new = 'Y' then q := q || ' and ('; new := 'N';
else
q := q || ' or '; end if;
q := q || '(instr(upper(b."JOB"),upper(''Station Construction (E'')) > 0) and
(instr(upper(b.”SET_YES_NO”),''NO'') > 0) ';
end if;
if :P33_STATION_INFRARED_SCANNING = 'YES' then
if new = 'Y' then q := q || ' and ('; new := 'N';
else
q := q || ' or '; end if;
q := q || '(instr(upper(b."JOB"),upper(''Station Infrared Scanning'')) > 0) and
(instr(upper(b.”SET_YES_NO”),''NO'') > 0) ';
end if;
if :P33_STATIONS_ASBESTOS_REMOVAL = 'YES' then
if new = 'Y' then q := q || ' and ('; new := 'N';
else
q := q || ' or '; end if;
q := q || '(instr(upper(b."JOB"),upper(''Stations Asbestos Removal'')) > 0) and
(instr(upper(b."SET_YES_NO"),''NO'') > 0) ';
end if;
if new = 'N' then q := q || ' ) ';
end if;
q := q || ' ) ';
return q;
end;

Similar Messages

  • I have big problems with mountain lion. you can not have a boot disk system I resulted in the need to re-download the os from scratch impiegandoci 8 hours, it is outrageous even with windows 95.

    I have big problems with mountain lion. you can not have a boot disk system I resulted in the need to re-download the os from scratch impiegandoci 8 hours, it is outrageous even with windows 95.
    at least that the operator has confirmed to me that he called me. I also have problems with either the start of the mac with the power off. I can not understand if it crashes or is just very very slow.
    Finally, I have a problem with the external hard disck. I often said to have been ejected incorrectly (not true) and I start to restore the startup recovery disk because disk utility is ineffective from the normal operating system .. is a shocking thing, but how you reduced. in four years it had never happened. seem to have windows or worse. Wake up.
    I am an Italian, alas, and then I would like an answer to my language because my € are the same as German French or English.

    You are on Windows 2000, you do not have a "Firefox" button, and should consider yourself to be fortunate in that you still have menus and don't have to do anything to get the menus back instead of the "Firefox" button. (The same applies to Windows XP users).
    Use the "File" menu to get to Import. You are not on Windows 7 or Vista, and don't have to put up with the nonsense added for Aero.
    If you want the "Firefox" button you can get it with View -> toolbars -> (uncheck) Menu Bar. The menu bar and the "Firefox" button were supposed to be mutually exclusive (which is impossible in some cases without being incompatible).
    Once you are using the "Firefox" button ...
    Use the "Alt" key to view the menu bar (temporarily) containing File, Edit, View, History, Bookmarks, Tools, and Help. On Windows 7 and Vista, the menu bar was hidden by default in Firefox 4 and above. These menu items are more or less available under the "Firefox" button which has the most used of the built-in Firefox menu items available in a different format.
    To get back to having menus again. "Firefox" button -> Options (second column) -> (check) Menu Bar
    You can make '''Firefox 7.0.1''' look like Firefox 3.6.*, see numbered '''items 1-10''' in the following topic [http://dmcritchie.mvps.org/firefox/firefox-problems.htm#fx4interface Fix Firefox 4.0 toolbar user interface, problems (Make Firefox 4.0 thru 8.0, look like 3.6)]. ''Whether or not you make changes, you should be aware of what has changed and what you have to do to use changed or missing features.''
    * http://dmcritchie.mvps.org/firefox/firefox-problems.htm#fx4interface

  • I think pesimo customer service three days, I'm looking for someone I can ayudr activation problem with my CC and can not find anyone who can help me.

    I think pesimo customer service three days, I'm looking for someone I can ayudr activation problem with my CC and can not find anyone who can help me.

    Online Chat Now button near the bottom for Activation and Deactivation problems may help
    http://helpx.adobe.com/x-productkb/policy-pricing/activation-deactivation-products.html

  • I have problem with the ID I can not forget to enter the account

    I have problem with the ID I can not forget to enter the account

    Please re-phrase the question or post in your native language.

  • I too have this problem with my ipad i can not sync any movies from pc to ipad help

    i have the problem seems that most are having anyway i can not put any movies from my pc to my ipad 9in screen with 64GB i can buy movies from itunes and they will down load in the right place but!!!!!!!!!!!!!!! i'lll be dang if i can't get my own like dispicable me 2 to go from my pc to my ipad 64gb help me please.

    Converting Video for ipad use:
    1-Download HandBrakeBatch app
    2-Open iPhoto app and select videos to be converted
    3-Drag videos to HandBreakBatch "video files" window
    4-Choose "iPad" as the video format from the drop down menu
    5-Choose "CONVERTED VIDEO" folder as the file destination
    6-START conversion
    7-When complete, add newly converted videos to iPhoto (drag folder to iphoto icon) and add them to "CONVERTED VIDEOS FOR IPAD" album.
    8-Connect iPad (iTunes already knows to sync to the iPhoto album ("CONVERTED VIDEOS FOR IPAD").
    I bought a new iPad Air from the Apple store in Madison, Wisconsin about a month ago. I asked how to transfer movie files from my Mac Book Pro to the iPad. It took the Genius about two hours to figure out the process. He typed the above instructions. I have not actually gone thru the above steps.
    Hope this helps

  • I am having problem with iphone 4s, I can not make calls or send text message? Please help.

    The problem is presistant. I tried to send the text message but it does not leave the phone, it is only delivered after I turn the phone off and then turn it on again. Only then it gets delivered and even that is only for that moment.
    Secondly, I can not send or recieve the calls as well.
    Thirdly, after I make a call, the calling screen gets stuck and I can not talk to the current caller or dial to another caller.
    Note: I have 'Not" dropped my iphone any where uptil now and I keep it in a pouch to protect it. The problem started recently and before that it worked fine. The problem started when I turned off the phone and after an hour or 2, I turned it on again.
    The signals of the service provider is coming perfectly. I haven't found any problem with there service yet.

    Network unavailable means the phone is detecting and using the SIM, else you would get a NO SIM error.
    It means that Sprint does not exist in the Ukraine (obvious), and Sprint does not have any interconnection agreement with a local carrier. Hence, the phone can't talk to anyone, carrier-wise. You need to get a SIM from a local carrier and try again. If it works, you're all set and the phone is indeed unlocked. Else you have been conned and will need to go and complain with whomever sold it to you.

  • Pls help me , I have problem with SB X-fi, can not config Speakers more

    My SB X-fi for notebook still working fine with window xp and I can config speaker out 2. to 7. but?last?week?I upgraded window to vista and install new dri've from creative ( XFXA_NBDRV_LB__0_0003 ), I only show 2/2. Speaker when I click Speaker Configuration can not config to more 2.
    Please help me how to fix this problem.
    Thanks

    unfortunately you are not alone, a lot of people have had problems incluiodng myselfm why did you updte in the first place? the best option is to roll back to old drivers and forget about update.
    have a look around these forums.
    ebmitie

  • Pls I have encountering a problem with my phone I can not access any information on my file in

    Please I can not open my file and also I could not download and update my whatsapp too it was just writting 907 invalid LOD

    TheArtificialNerd wrote:
    I can say 100% that the AppleCare phone number only redirects to other AppleCare groups.
    ALL of them Apple corporate or Apple Authorized partners.

  • Is there a problem with too many request attributes

    I am fairly new to jsps and this is a best practices question
    I find that adding request attributes to my jsp is easy way to get data referenced in the jsp. Is this a bad practice and what is the ideal way to pass data to the jsp?
    Thanks.

    Putting attributes into the request scope if perfectly fine.
    If there are a lot of attributes though, grouping them into beans and just setting one bean in the request scope would be better.
    eg if you wanted to display a users details on screen, you COULD do
    request.setAttribute("username", user.getUserName());
    request.setAttribute("usercountry", user.getCountry());
    OR
    request.setAttribute("user", user);
    and on your JSP page
    <jsp:useBean id="user" ... />
    <%= user.getUserName() %>
    or with EL ${user.userName}
    Cheers,
    evnafets

  • I have problems with the agenda i can not seen the 12 months

    Dear Gentlemens and Womans
    I have download one week a go Mountain Lion,  but i have  a problem on my macbook in the agenda  i have  also an imac and ipad and i use icloud
    I can in de agenda use the day, the week, the month   but not the year ware you can see the 12 month  on my Imac can i well see the year
    Who can help me with this problem
    greatings
    Ad van Andel  
    [email protected]

    Contact Apple Support.  Here's how:
    http://support.apple.com/kb/HE57

  • Problems with snow leopard install- can not retrieve my user files

    would it make any sense to re-load my old operating disks (os x) to try and re-cover my old user. I have tried everything from disk repairs to disk warrior, nothing will allow me to copy the user so that i can back it up. Last resort is taking it in and having some one charge me $100 an hour to say your out of luck.

    The laserjet 4m personality can be configured as Auto or fixed to Ethertalk.
    You may need to change the Personality (on the printer, via its control panel) to auto.
    ===
    On the mac, create a new LPR/LPD printer.
    Use 192.168.0.4 as the address.
    You should be able to use the default queue name.
    If it still does not print, then
    open a web browser, goto http:\\192.168.0.4 or print the MIO configuration page from the laserjets control panel.
    verify the settings on the printer. Pay attention to the queue name and any default port listed.
    I think the default queue name is _192.168.0.4
    (Yes, the underscore is part of the name)
    You may have to enter that on the Mac printer setup as well.
    If the default port is 4 digits, then you may need to add it to the printer address.
    For example, if the lpr port is shown as 9300
    then on the address line in printer setup on the mac should read:
    192.168.0.104:9300
    Bonus: once you get it configured correctly, straight LPD/LPR prints a lot faster than appletalk.

  • Select with too many where conditions not working fine....equal to and not

    Hi Everyone,
      I am getting rows into internal table lt_mseg even if this where condition like this werks NE gs_t001w-werks in below code
    is true. It looks like it's not excluding if not equal to gs_t001w-werks. Is anything wrong in below code? please help me...
    SELECT * INTO TABLE gt_t005 FROM t005 WHERE xegld = 'X'.
    SELECT * FROM t001w INTO TABLE gt_t001w FOR ALL ENTRIES IN gt_t005
    WHERE ( land1 = gt_t005-land1 OR land1 = 'NO' ) AND vkorg NE 'LDE'.
    SELECT * FROM mkpf INTO TABLE gt_mkpf
    WHERE budat IN p_oextdt AND vgart = 'WL'.
    LOOP AT gt_mkpf INTO gs_mkpf.
    CHECK gt_t001w[] IS NOT INITIAL.
    SELECT * FROM mseg APPENDING TABLE lt_mseg
    FOR ALL ENTRIES IN gt_t001w
    WHERE mblnr = gs_mkpf-mblnr
    AND mjahr = gs_mkpf-mjahr
    AND bwart NE '641'
    AND xauto = ' '
    AND werks NE gs_t001w-werks
    AND kunnr = gt_t001w-kunnr.
    ENDLOOP.

    Hi Sany,
      Thanks for your reply. I f I remove  this LOOP AT gt_mkpf INTO gs_mkpf and use for all entries how can I exlude plants that I got from t001w?
       I used range here in below code now I am getting run time error in this loop, it says value table for IN itab operator has unexpected format....
    DATA:
          gt_t005 TYPE TABLE OF t005,
          gs_t005 LIKE LINE OF gt_t005,
          gt_t001w TYPE TABLE OF t001w,
          gt_rng_plant  type range of t001w,
          gs_rng  like line of gt_rng_plant,
          gs_t001w LIKE LINE OF gt_t001w,
          gt_mkpf  TYPE TABLE OF mkpf,
          gs_mkpf  LIKE LINE OF gt_mkpf .
    SELECT * INTO TABLE gt_t005 FROM t005  WHERE xegld = 'X'.
      SELECT * FROM t001w INTO  TABLE gt_t001w FOR ALL ENTRIES IN gt_t005
       WHERE ( land1 = gt_t005-land1 OR land1 = 'NO' ) AND vkorg NE 'LDE'.
      SELECT *  FROM mkpf INTO TABLE gt_mkpf
                  WHERE budat IN p_oextdt AND vgart = 'WL'.
      gs_rng-sign = 'I'.
      gs_rng-option = 'EQ'.
      LOOP AT gt_t001w INTO gs_t001w.
        gs_rng-low = gs_t001w-werks.
        gs_rng-high = gs_t001w-werks.
        APPEND gs_rng TO gt_rng_plant.
      ENDLOOP.
        LOOP AT gt_mkpf INTO gs_mkpf.
          SELECT * FROM mseg APPENDING TABLE lt_mseg
              FOR ALL ENTRIES IN gt_t001w
              WHERE mblnr = gt_mkpf-mblnr
                AND mjahr = gt_mkpf-mjahr
              AND bwart NE '641'
                AND xauto = ' '
                AND werks not in gt_rng_plant
                 AND kunnr = gt_t001w-kunnr.
        ENDLOOP.

  • Struts 1.0  problem with weblogic 6.1, can not getProperty

              Hi, I have a struts 1.0 based war application deployed to weblogic 6.1, and when
              I try to access a javabean property in my jsp,
              If it is a simple javabean
              <jsp:useBean id="book" scope="session" class="com.sssw.demo.silverbooks.BookBean"/>
              <jsp:getProperty name="book" property="title"/>
              thing are fine.
              But if it is a complicated one, like
              <logic:iterate id="featuredBook" name="featuredBooksCollection" property="books">
              BookId: <jsp:getProperty name="featuredBook" property="bookId"/>
              </logic:iterate>
              (featuredBooksCollection is a javabean, where its getBooks() return a collection
              of javabean of type BookBean)
              weblogic will say bookbean does not have a property named bookId,
              but if I change the
              <jsp:getProperty name="featuredBook" property="bookId"/>
              to
              BookId: <%=((BookBean)featuredBook).getBookId()%>
              Things would work.
              Does anyone know why weblogic has this strange behavior?
              Thanks a lot.
              Irene
              

              I have the same problem too. Does anyone know how to solve this problem
              Van
              "Irene Yip" <[email protected]> wrote:
              >
              >Hi, I have a struts 1.0 based war application deployed to weblogic 6.1,
              >and when
              >I try to access a javabean property in my jsp,
              >If it is a simple javabean
              ><jsp:useBean id="book" scope="session" class="com.sssw.demo.silverbooks.BookBean"/>
              ><jsp:getProperty name="book" property="title"/>
              >thing are fine.
              >
              >But if it is a complicated one, like
              ><logic:iterate id="featuredBook" name="featuredBooksCollection" property="books">
              >
              >BookId: <jsp:getProperty name="featuredBook" property="bookId"/>
              ></logic:iterate>
              >
              >(featuredBooksCollection is a javabean, where its getBooks() return a
              >collection
              >of javabean of type BookBean)
              >
              >weblogic will say bookbean does not have a property named bookId,
              >
              >but if I change the
              ><jsp:getProperty name="featuredBook" property="bookId"/>
              >to
              >BookId: <%=((BookBean)featuredBook).getBookId()%>
              >
              >Things would work.
              >
              >Does anyone know why weblogic has this strange behavior?
              >Thanks a lot.
              >
              >Irene
              

  • HT201699 i am having problem with celluler option i can not see any tab called cellulerr in setting what should i do i am having iphone 4s (i am using GEVEY)

    i go to setting and i cant see celluler tap in it . what should i do i want to turn on my 3G network! i am using my phone on GEVEY! thanks for your help

    Well with a Gevey SIM you are on your own

  • Problem with footer in table style not applying paragraph style... or just me?

    I'm having a niggling problem making a table style with cell/paragraph styles for the header, body, and footer respectively. I want to make it as simple as possible for other users but one thing keeps tripping me up. I'll try and describe with screenshots. I'm using InDesign CS5 on Windows 7.
    I have a table style set up with cell styles for the header, body, and footer, and paragraph styles for each as well. Say I'm converting a list of generic text to this table:
    i convert it to my table style. The body style is a numbered list:
    I convert the header to an, err, Header. The cell applies the header paragraph style as I should expect:
    I convert the footer likewise, but it maintains the Body text paragraph style as an override!
    So naturally I clear the override and it works fine. But of course, I'd rather it acted like the header row. I can't work out where the override on the footer comes from and why it operates differently in this respect to the header row. There is nothing different about how the styles are constructed. Have I made a mistake somewhere, or is this correct behaviour I'm misinterpreting, or something...?
    edit: Here is the file, if that will help:
    https://www.dropbox.com/s/4kzgui1itaskuvz/strip%20list%20test.indd

    Hi,
    I was able to reproduce the issue you are facing.
    I will be logging a bug for this and it would be investigated.
    Thanks a lot for reporting the problem!!
    Javed

Maybe you are looking for

  • Getting results from LDB (Logical Database)

    Hi All, I have a requirement where i need to pass LDB results to external application. It can be any LDB. Like in SE36 we put the LDB name and execute and final results are shown in ALV. I dont need it to display in ALV but from my custom program, ne

  • Problem with AIM/ICHAT ....please help

    I have a family member that just purchased their first Apple and need help. They have AOL as their internet provider but also want to use Ichat. If they try to open IChat it opens AOL and then they can't log in to IChat because they can't have AIM op

  • HT204022 photo stream, pictures to the computer and then deleted?

    In my albums, photo stream shows up with hundreds of pictures in it.  I want to copy them to my computer and delete them, but I don't seem to know how to do this.  Help please. photo stream has no delete button anywhere that i can find. 

  • Big problem after updating to Premiere 2014.2

    Since I updated Première to 2014.2 I have a buggy Première and AME. I work a lot with multicam and the timeline won't play smooth and crashes when playing longer than 30 seconds. AME crashes within 3 minutes of rendering. With 2014.1 my laptop (asus

  • TC works in airport utility - but can't find it under time machine

    Hello out there I have a BIG problem .. I have for some while ago, bought a TC and used it with no problems for some month while i have had a wi-fi at home .. Now, I don't have the wi-fi connection anymore - i use my iPhone for sharing, so the settin