Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Error parsing PL-SQL query

JJINOct 7 2009 — edited Oct 7 2009
HI

Im using the following PL-SQL query in my region.
declare
v_sql varchar2(3000);
begin

v_sql:='SELECT  DISTINCT
        CASE WHEN piv.PROVISION_STATE_ID = 1 or 
            piv.PROVISION_STATE_ID = 5 or 
            piv.PROVISION_STATE_ID = 4 or
            piv.PROVISION_STATE_ID = 10 
        THEN
           apex_item.checkbox(10,t.termination_id,'onclick=enableButton2()') 
        ELSE
            --apex_item.checkbox(1,"EQUIPMENT_ID",'disabled') 
            apex_item.checkbox(10,t.termination_id,'disabled')
        END "PROVISION FOR IV",
       t.termination_name "INTERFACE NAME",
       t.termination_id "TERMINATION ID",
       t.termination_type_id "INTERFACE TYPE",
       e.equipment_name "DEVICE NAME",
       tf.value "IP ADDRESS",
       psl.provision_state_name "IV PROVISION STATE",
       APEX_ITEM.SELECT_LIST_FROM_LOV(11,(SELECT ds.delivered_service_name 
          FROM delivered_service ds
          JOIN delivered_service_mapping dsm
            ON ds.delivered_service_id=dsm.delivered_service_id
         WHERE equipment_id IS NULL
           AND customer_id IS NULL
           AND termination_id=t.termination_id
        ),'DS_LEVEL_INTERFACE') as "DS LEVEL"


  FROM equipments e
  JOIN terminations t
    ON e.equipment_id=t.equipment_id
   AND e.equipment_id=:P29_TO_INTERFACEPAGE   
  JOIN termination_types ty
    ON t.termination_type_id=ty.termination_type_id
  JOIN termination_features tf
    ON tf.termination_id=t.termination_id
   AND tf.name='Interface_IP'
   JOIN provision_iv piv
    ON piv.termination_id=t.termination_id
   AND piv.equipment_id=t.equipment_id
  JOIN provision_state_lookup psl
    ON piv.provision_state_id=psl.provision_state_id 
';

:P29_TO_INTERFACEPAGE:=NULL;
return v_sql;
end;
On Applying the changes its throwing mw the following errors.
1 error has occurred
Function returning SQL query: Query cannot be parsed within the Builder. If you believe your query is syntactically correct, check the generic columns checkbox below the region source to proceed without parsing. 
(ORA-06550: line 11, column 52: PLS-00103: Encountered the symbol "ONCLICK" when expecting one of the following: * & = - + ; < / > at in is mod remainder not rem <> or != or ~= >= <= <> and or like LIKE2_ LIKE4_ LIKEC_ between || multiset member SUBMULTISET_ The symbol "*" was substituted for "ONCLICK" to continue. ORA-06550: line 11, column 75: PLS-00103: Encountered the symbol ") ELSE --apex_item.checkbox(1,"EQUIPMENT_" when expecting one of the followi)
Please help

tJ

Edited by: tj2010 on Oct 6, 2009 10:51 PM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 4 2009
Added on Oct 7 2009
15 comments
1,118 views