One more time: lack of right parenthesis

Hi guys,.

I searched the forum for another thread that might give me the answer I'm looking for, but I found no one.

I'm new to APEX and I have to build a crosstab. To do this, I founded my development on really force crosstab / Pivot report example.

My package is completely identical it is on that page and I have adapted to the query of the report (= classic, non-interactive) based on PL/SQL, so it fits my needs, the result is:

DECLARE

l_return_value VARCHAR2 (32767).

BEGIN

l_return_value: = PK_PIVOT. PivotSQL ("SELECT * FROM"Ploegrapport - view "', 'SOD_OMSCHR_LANG, OOD_OMSCHR_LANG, ACT_OMSCHR_LANG, TAAK_OMSCHR_LANG, ORG_NIV4, ORG_NIV5', 'NK_WERKNEMER', 'MIN', 'J_N', nvl (:P2_PAGENUMBER,1));)

RETURN l_return_value;

END;

When I try to run it, I get the error ORA-00907: lack the closing parenthesis.

When I click on "debug", it changes to:

debug logging error ORA-06502: PL/SQL: digital or value error: character string of the buffer too small ORA-00907: lack the right parenthesis

Failed to parse the SQL query:

ORA-00907: lack of right parenthesis

When I then click on "debug mode" I get the following:

... Run the statement: declare function x return varchar2 is begin DECLARE l_return_value VARCHAR2 (32767). BEGIN l_return_value: = PK_PIVOT. PivotSQL ("SELECT * FROM"Ploegrapport - view "', 'SOD_OMSCHR_LANG, OOD_OMSCHR_LANG, ACT_OMSCHR_LANG, TAAK_OMSCHR_LANG, ORG_NIV4, ORG_NIV5', 'NK_WERKNEMER', 'MIN', 'J_N', nvl (:P2_PAGENUMBER,1));) RETURN l_return_value; END; Returns a null value. end; begin wwv_flow.g_computation_result_vc: = x; end;

...... Result = SELECT SOD_OMSCHR_LANG, OOD_OMSCHR_LANG, ACT_OMSCHR_LANG, TAAK_OMSCHR_LANG, ORG_NIV4, ORG_NIV5, MIN (DECODE (NK_WERKNEMER 'XXXXX' J_N, null)) as "XXXXX", MIN (DECODE (NK_WERKNEMER 'XXXXX' J_N, null)) as "XXXXX", MIN (DECODE (NK_WERKNEMER 'XXXXX' J_N, null)) as "XXXXX", MIN (DECODE(NK_WERKNEMER,XXXXX',J_N,null)) as "XXXXX", MIN (DECODE (NK_WERKNEMER Null 'XXXXX' ((, J_N,)) as "XXXXX" MIN (DECODE (NK_WERKNEMER 'XXXXX' J_N, null)) as "XXXXX", MIN (DECODE (NK_WERKNEMER 'XXXXX' J_N, null)) as "XXXXX", MIN (DECODE (NK_WERKNEMER 'XXXXX' J_N, null)) 'XXXXX', MIN (DECODE (NK_WERKNEMER 'XXXXX' J_N, null)) as "XXXXX", MIN (DECODE (NK_WERKNEMER 'XXXXX' J_N, null)) as "XXXXX", MIN (DECODE (NK_WERKNEMER, J_N ' XXXXX', null)) as 'XXXXX '. MIN (DECODE(NK_WERKNE~), MIN (DECODE (NK_WERKNEMER 'XXXXX' J_N, null)) as 'XXXXX'

(Don't worry the XXXXX, I put it there manually because this is sensitive information, the field is actually correct and represents the names of people.) The query works when I cut the last piece, which is broken, and when I add a group, so the query he built seems to be OK

As you can see the query in debug is actually broken after 999 characters, this is simply due to the fact that debugging will show no more than 999 characters, or is this really my problem, that the query is broken before the full statement is complete.

If this is the first option: then where would my problem? If it's the latter: I checked the report query code and the package code and I can't find a reason why this request would be accepted to exist out of 999 characters.

I am currently working with the test environment Oracle supplied us, because we test if we can use APEX in our company.

The version is Application Express 4.2.2.00.11 and it is running on Oracle 11 g.

If you need more information, just ask and I'll post it as soon as possible.

During the validation of the responses, please keep in mind that I am a beginner at this and have trouble understanding complex responses .

Thanks for your help!

NDG

Hello

I discovered what the problem was.

In my data, there is an employee with a '-character in his name and that's what makes the query returns an error. I tried again, this time without taking account of all the names with a '-character and that the query ran successfully, now a column made dynamically for each employee, just as I wanted.

Thank you Tom for your efforts!

Tags: Database

Similar Questions

  • ORA-00907 - "lack the right parenthesis.

    Hello

    I am trying to create a procedure to add table scores each month. This is my code:

    create or replace procedure add_partitions

    as

    v_partition all_tab_partitions.partition_name%type;

    v_limit varchar2 (50);

    LONG v_sql;

    Start

    Select to_char (trunc (add_months(sysdate,1), 'MM'), 'Mon_YYYY')

    in v_partition

    Double; -napr. 072014

    Select to_char (trunc (add_months(sysdate,2), 'MM'), 'DD-MM-YYYY')

    in v_limit

    Double; -napr. 08/01/2014

    v_sql: = ' ALTER TABLE CENTRUMADMIN. AUD$ _BACKUP ADD PARTITION '. v_partition | «VALUES LESS THAN (' |)» v_limit | ') tablespace BACKUP_AUDIT';

    immediately run v_sql;

    end;

    /

    The procedure is compiled without errors, but when I run it I get this error:

    ORA-00907 - "lack the right parenthesis.

    After some tests, I am sure that this problem is here: VALUES LESS THAN (' | v_limit |) (')... but I'cant understand whats wrong

    Any ideas? Thanks in advance

    Honza

    Hi Mika,

    Try

    VALUES LESS THAN ("' | v_limit |) (') - three times - 2 gives you a ' in your statement - the 3rd chain delimited

    concerning
    Kay

  • Using DBMS_METADATA. GET_DDL get error: ORA-00907: lack the right parenthesis

    Hello

    I try to extract the schema DDL to a base (10.2.0.4.0 - 64-bit Enterprise Edition on Solaris 10). I ran the query below and get an ORA-00907: parenthesis right absent error.

    SELECT DBMS_METADATA. GET_DDL (REPLACE(object_type,' ','_') AS object_type, object_name) FROM user_objects WHERE object_type NOT IN ('TABLE_PARTITION', "INDEX_PARTITION", "LOB");

    This is the output when executing the above in the sqlplus worksheet

    Select DBMS_METADATA. GET_DDL (REPLACE (object_type, ", '_') as object_type, object_name) FROM user_objects if object_type in ('TABLE_PARTITION',"INDEX_PARTITION","LOB")
    *
    ERROR on line 1:
    ORA-00907: lack of right parenthesis

    remove the where the clause gives the following:

    Select DBMS_METADATA. GET_DDL (REPLACE (object_type, ", '_') as object_type, object_name) FROM user_objects
    *
    ERROR on line 1:
    ORA-00907: lack of right parenthesis

    Pointers would be welcome. I know I could get the DDL using exp/imp, but I'd like to understand why I get the error of missing parenthesis.

    see you soon,

    Ewan

    SELECT DBMS_METADATA. GET_DDL (REPLACE(object_type,' ','_') AS object_type, object_name) FROM user_objects WHERE object_type NOT IN

    You don't need an alias here. Getting rid of the "as long as object_type' and it should work.

  • Formula node error: lack the right parenthesis

    Community salvation OR,.

    I work with the structure of nodes formula for the first time and I came across this error that I can't fix.

    He says he finds a character #, but the strange thing is that there is no character. Is there someone who can help me with this one please?

    Kind regards

    Thomas Ruts

    On your first long form you are missing a closing parenthesis.  It is in the last half of the formula.  You have two left parenthesis, but only a right.

  • error: ora-00907 lack the right parenthesis

    Hello


    I don't know where I am doing wrong, please help me


    update of tmp_data_mins p

    SET p.DISPLAY_VOLUME = ((select display_volume from tmp_data_mins

    where RULE_APPLIED =' rule 2: three consecutive time intervals are

    missing with the period ') q

    where (to_char (p.DAYASDATE,'DD/MM/YYYY HH24')) =

    (to_char (q.DAYASDATE,'DD/MM/YYYY HH24'))

    AND p.HOURASNUMBER = q.HOURSNUMBER);


    Thanks in advance

    Your syntax is disabled, you try to make a mixture of subquery and join that is not valid.  It should be something more like:

    update of tmp_data_mins p

    SET p.DISPLAY_VOLUME = (select display_volume

    of tmp_data_mins q

    where q.RULE_APPLIED =' rule 2: three consecutive time intervals are missing the period ' and

    trunc (p.DAYASDATE, 'hh24') = trunc (q.DAYASDATE, 'hh24')

    AND p.HOURASNUMBER = q.HOURSNUMBER)

    where exists (select display_volume

    of tmp_data_mins q

    where q.RULE_APPLIED =' rule 2: three consecutive time intervals are missing the period ' and

    trunc (p.DAYASDATE, 'hh24') = trunc (q.DAYASDATE, 'hh24')

    AND p.HOURASNUMBER = q.HOURSNUMBER);

    I'm not ethat you really need the trunc applied to dates, but it is equivalent to your expression to_char, and it is generally much safer to compare dates in dates rather than convert a date to a string and compare those.

    Also note that, as wrote your query and mine updates all rows in the parameter tmp_data_mins display_volume table to null for rows that do not match the subquery.  You would (probably) need to add another predicate in the outer query the identifu only the lines that you want to update, and there are predicate using the same query in the clause set would be a likely candidate.

    That said, I don't understand what you're trying to accomplish with this update because you're updating at the same table you are querying of.  As said by Frank, a few examples of data and an explanation of what you're trying to accomplish would be useful.

    John

    After seeing just this thread https://community.oracle.com/thread/3560425 I think I understand what you're trying to do and changed the query above (I think) do the update that you want, and it seems that you have the trunc applied to dates.

    Post edited by: John Spencer

  • ORA-00907: lack of right parenthesis

    Hi all

    on 11.2.0.4 on Win 2008

    When executing:

    Select creele, TRUNC ((creele, 'DD')) of loans;

    I get:

    ORA-00907: missing a closing parenthesis (on column 28).

    Any idea?

    Let's see creele format:

    Select creele loans;

    CREELE

    --------

    10/11/14

    21/10/14

    Thank you.

    Can you tell me please why column A and B have different results:

    Select trunc (AVG (trunc(rendule,'DD')-trunc(creele+1,'DD')), 2) A.

    TRUNC (AVG (trunc(rendule,'DD')-trunc(creele,'DD') + 1), (2) B

    details, loans

    WHERE details.emprunt = emprunts.numero

    and borrowing. NUMBER = dΘtails. LOAN

    AND details.rendule is not null

    GROUP Member;

    Because you say to do different things. Suppose that there is just a line in your table, with a rendule of 30/04/2015 and a creele from 20/04/2015.

    A = 30/04/2015 - (20/04/2015 + 1) = 30/04/2015 - 21/04/2015 = 9

    B = 30/04/2015-4/20/2015 + 1 = 10 + 1 = 11

    If you want to arithmetic operations to be performed in a particular order, it is best to use parentheses to make the order without ambiguity. This would return the same value as the A (if that's what you want):

    TRUNC (AVG (trunc(rendule,'DD') - (TRUNC(creele,'DD') + 1)), 2).

  • [Error] Run (): ORA-00907: lack the right parenthesis

    Hello world

    help out me fom this problem

    SELECT (SELECT LPAD (s.b_borough_no, 2, 0) |) '/' || LPAD (s.site_no, 6, '0')

    OF s app.sites@sfm

    ID WHERE = sit_id)

    as full_id,

    TRS.*,

    VP. FINPERID,

    VP. FINPERCH

    OF tr_review_schedules trs, TIMINGREVIEW. VP VW_FINANCIAL_PERIODS

    WHERE the trs.sched_closeout_date BETWEEN (vp. PERSTARTDATE = TO_DATE (APRIL 1, 2011 00:00:00 "," MM/DD/YYYY HH24:MI:SS')))

    AND (vp. PERENDDATE = TO_DATE (APRIL 30, 2011 00:00:00 "," MM/DD/YYYY HH24:MI:SS')))

    AND trs.trd_id IS NOT NULL

    AND trs.reportable = 'Y '.

    ORDER BY 1;

    Your problem is in him between predicate.  The format of is:

    column between value1 and value2

    I don't quite know what you're trying to do with the columns perstartdate and perenddate, but maybe something more like:

    Select (select lpad (s.b_borough_no, 2, 0) |) '/' || LPAD (s.site_no, 6, '0')

    of app.sites@sfm s

    where id = sit_id) as full_id,

    TRS.*, vp.finperid, vp.finperch

    of tr_review_schedules trs, timingreview.vw_financial_periods vp

    where trs.sched_closeout_date between vp.perstartdate and vp.perenddate and

    TRS.trd_id is not null and

    TRS.reportable = 'Y' and

    VP.perstartdate = to_date (April 1, 2011 00:00:00 ',' dd/mm/yyyy hh24:mi:ss') and

    VP.perenddate = to_date (April 30, 2011 00:00:00 ',' hh24:mi:ss' of dd/mm/yyyy)

    order by 1;

    However, I am not convinced that this is between a reasonable join between tr_review_schedules and vw_financial_periods.

    John

  • One more time...

    I typed a few times, only to be sent to another login screen again, so excuse the brevity, but this is getting old.

    1. Old computer died
    2. Buy a new (win 8 64-bit)
    3. Connected to my account at Adobe, downloaded CS5.5, for which I have a serial number valid
    4. A crossed the configuration screens, serial number entered a few times when you are prompted, said my serial number isn't a product calling.
    5. Clicking on the help"" button.
    6. Logged into my account
    7. Repeat steps 4-6
    8. Logged into my account, asked a question in the forum
    9. The forum said at what age I
    10. Logged into my account and typed this
    11. When can I get off this ride?

    Ideally, I would switch to CS6 and tells me in several places on the site that I can.  But I have to at least get 5.5 reinstalled.  Of course, cannot turn off old computer died.  I can't imagine that this is a rare case, so if anyone can tell me the directions for how to do it, I would really appreciate it.

    Thank you!

    For serial number questions you need to contact support by phone or web chat, although it seems you simply not provide a serial number of the previous product for your CS5.5 upgrade package. Do you have any version before that? Really any product previous back to CS3 should be...

    Mylenium

  • ORA-00907: lack the right parenthesis when using Group by clause with xmlagg

    I have the following query and I am getting ORA-00907 error when I use the clause with the xmlagg function group.
    select xmlelement("Mitigation",
                    xmlelement("m_szMethodName",tm.DisplayName),
                    xmlelement("SubstanceInterferenceProtocolList",
                                (select xmlagg(xmlelement("MitigationProtocol",
                                        xmlelement("m_szMethodName",tm.DisplayName),
                                        xmlelement("m_szInterferenceProtocolName",tmp.protocol_name),
                                        xmlelement("m_szInterferenceSubstance",tmp.intf_mtrl_prod_code),
                                        xmlelement("m_ProtocolParameters",
                                            xmlelement("m_szProtocolName",tmp.protocol_name),
                                                xmlelement("m_Consumables",
                                                    xmlelement("Consumable",
                                                        xmlelement("m_szConsumId", xrl.rgnt_pack_name),
                                                        xmlelement("m_szProductCode",xrl.pack_prod_code),
                                                        xmlelement("m_nVolume",tmp.fluid_vol),
                                                        xmlelement("m_szProtocolStep",xps.protocol_step_name))),
                                                    xmlelement("m_ProtParamList",
                                                        xmlagg(
                                                        xmlelement("ParameterValues",
                                                            xmlelement("m_szProtocolName",tmp.protocol_name),
                                                            xmlelement("m_Time",xpsd.parameter_ntime_value))
                                                        group by tmp.ccd_test_id,tmp.intf_mtrl_prod_code)
                    )))
                    order by tmp.ccd_test_id, tmp.intf_mtrl_prod_code, xps.protocol_step_intprotocolstep )
                    from XPR_tdef_mitigation_protocol tmp, xp_reagentlist xrl,
                    xpr_protocol_settings xps, xpr_protocol_settings_default xpsd
                    where tmp.ccd_test_id = tm.ccd_test_id
                    and tmp.ccd_test_id = xrl.ccd_test_id
                    and tmp.pack_prod_code = xrl.pack_prod_code
                    and tmp.intf_type = 1
                    and xps.protocol_name = xpsd.protocol_name
                    and xps.protocol_step_name = xpsd.protocol_step_name
                    and xps.ps_action_parameterlist = xpsd.ps_action_parameterlist
                    and xps.protocol_name =  tmp.PROTOCOL_NAME
                    )))
    from XPtoXPRTdef_defn_mapping tm
    where tm.DisplayName = 'SYPH'
    If I remove the clause xmlagg and the group by clause, the query works well and not give me the result.
    But in this code XML, the output format is incorrect for my application.

    Could someone help out here?

    Now my problem is that this unique coating is more than 32767 characters and utl_file can write 32767 bytes per line.
    Someone deal with this?

    Serialize the output as CLOB and DBMS_XSLPROCESSOR.clob2file procedure used to write to a file:

    DECLARE
      xml_output CLOB;
    BEGIN
      SELECT XMLElement("Department",
               XMLAgg(
                 XMLElement("Employee",e.job_id||' '||e.last_name)
                 ORDER BY e.last_name
               )
             ).getClobVal() AS "Dept_list"
      INTO xml_output
      FROM hr.employees e
      WHERE e.department_id = 30 OR e.department_id = 40;
    
      DBMS_XSLPROCESSOR.clob2file(xml_output, 'XML_DIR', 'test.xml');
    END;
    /
    
  • I tried on & plus one more time, error code 80080005 continues to climb, I can't update my laptop until it comes to solve .__Can you help me please? __

    Remember - this is a public forum so never post private information such as numbers of mail or telephone!

    Ideas:

    • Programs that you have problems with Vista home
    • Error 80080005
    • Recent changes to the update of your computer
    • What you have already tried to solve the problem, tried to update some updates went well, I think that this error is causing others to fail

    You forgot to write anything in your ad, as this OS you use etc.

    This error is associated with linked the usual "access denied."

    See if this helps:

    http://support.Microsoft.com/kb/313222
    How to reset security settings to default values TaurArian [MVP] 2005-2010 - Services update

  • One more time: Houston-25014: the record has been changed by another user. Please try again.

    Hello

    JDev 11.1.2.4

    I have a workflow where I execute with params VO, and then navigate to a view activity. On this page fragment, I click on a button that calls a PL/SQL procedure in the module of the application. The proceduce updates a row in the table. After this method call, I navigate to the same run with params.

    Execute with params-> view activity method-> call-> Execute with params (the app module method)

    But I have an exceptional:

    oracle.jbo.RowInconsistentException < DCBindingContainer > < reportException > [2669]: Houston-25014: the record has been changed by another user. Please try again.

    at oracle.jbo.server.OracleSQLBuilderImpl.doEntitySelectForAltKey(OracleSQLBuilderImpl.java:1078)

    at oracle.jbo.server.BaseSQLBuilderImpl.doEntitySelect(BaseSQLBuilderImpl.java:552)

    at oracle.jbo.server.EntityImpl.doSelect(EntityImpl.java:8311)

    at oracle.jbo.server.EntityImpl.populate(EntityImpl.java:6975)

    In the log, I see the error.

    Compare entity < EntityImpl > < compare > [2305] has no attribute Addr1

    < EntityImpl > < compare > [2306] original value: COURTUPD

    Target value < EntityImpl > < compare > [2307]: COURTUPDfewfew

    The update in the procedure updates this field. The procedure performs validation, I made the call.

    I suspected that the case of ghost ADF so I put update on update for this field, but it does not work.

    Any idea on who is the user who changes my file without telling me?

    Thank you

    You have something in your entity that has changed.  Call rollback on your transaction module app before executeWithParams put it in a clean condition.

  • One more time. How can I disable history of cloud of Safari and Safari Notifications?

    Hello??

    Guest of installation of close SafariNotificati

    https://helpx.Adobe.com/Acrobat/KB/install-prompt-close-safarinotificati.html

  • NQSServer starts is not (one more time)

    Hello world
    Well, it becomes repetitive but... What can we do?
    NQSServer says:

    Oracle BI Server is starting...
    Failed to start the server:

    And he said not even what's wrong!
    No message error, not Merry Christmas, happy summer no vacation, no nothing.
    Thank you.

    You have something else running on port 9703?

  • REP-300: lack of right parenthesis

    Hi, after having migrated from 6i to 10 g I get the above message when I am tryting to generate a report. the main request in the report is this:

    Select F.facility_id,
    F.domestic_registration_nbr,
    F.field_establishment_nbr,
    F.primary_business_name
    F facilities
    where F.ber_status_text = 'ACTIVE'.
    and F.facility_id; in (select B1.facility_id
    F1 facilities,
    ber_action_history B1
    where F1.facility_id = B1.facility_id
    and F1.ber_status_text = 'ACTIVE '.
    & P_WHERE2
    and B1.action_type_cd = 'PA')
    & P_WHERE1
    & P_ORDER

    When I comment on the parameters of the query works fine in Toad.

    I've been stuck with this problem for days, any help will be greatly appreciated by g.

    Try:

    function boolean return AfterPForm is
    Start
    : P_WHERE2: = "" and 1 = 1; ".
    return (TRUE);
    end;

  • Satellite C55-B854 - right click takes more time

    My laptop Satellite C55-B854 takes more time in the right click. Here are few 8.1 window pro.32

    Hello

    Unfortunately, it is not easy to understand. What do you mean exactly with takes longer in a right-click?
    Your laptop is may be busy and when you click the right mouse button to open a menu it takes little time to seconds before it is displayed on the screen.

Maybe you are looking for

  • How can I make my private search history?

    I don't want to keep a history of what I am looking on the Internet when I use Firefox. I have not been able to set this parameter on the Firefox app. Please notify. I use Firefox on my laptop and the history records, but on the app smart phone is re

  • Need to buy speakers Satellite X 200 / X 205 harman-kardon

    Anyone know where I can find to buy the TOSHIBA X 200 or X 205 harman-kardon speakers (left + right + subwoofer)?And the black covers too... (without the Board of Directors 7 buttons) Help, please

  • calculation of the checksum of the sum of

    Hello T the world I am trying to diet to control a programmable Spellman via the RS232 connection that is connected to the PC under LABVIEW and pour it I must ORDER ASCII en code messages, and each message to calculate the chechsum (MUHC checksum) po

  • Cannot install the disc existing Outlook 2003 to new Dell with windows 7.

    Cannot install the disc existing Outlook 2003 to new Dell with windows 7.Cannot copy old file .exe that runs on windows xp.  does not open. Site MS says compatible with OUtlook 2003 IS- That is what it is?

  • Microsoft 2005 c ++ redistributable

    I installed microsoft c ++ 2005 redistributable and always get "game is unavailable" error and 'side by side configuration is incorrect' when opening from the folder