How to debug a query in Apex

Hi all,
I have written a query under region source in interactive reports
select getTextColumnByID(:ID,OHR_PARAMETERS,VALUE) as Description,max_mark from max_marks where
employee_id='Z901234';and it throws error as ORA-00904: "VALUE": invalid identifier
How do i debug and locate the probelm?
thanks

No it does not work,,It throws the same error.I found the problem its because the query throws multiple rows where only one row is expected.
the query should be like
select getTextColumnByID('ID','OHR_PARAMETERS','VALUE') as Description,max_mark from max_marks where
employee_id='Z901234';to get compiled.

Similar Messages

  • How to debug Infoset Query in ABAP?

    Hi
       I have an Infoset Query created by another user, please let me know how to debug this?
    Thanks
    Naga

    Nagarani - For debugging a infoset query, you have to create a query in SQ01 for the infoset which you are planning to debug. Once the query in transaction SQ01 is generated, Activate the same. Use the following path to generate program for created query from SQ01  QUERY--> MORE FUNCTIONS > GENERATE PROGRAM. Once the program is generated use the path QUERY>MORE FUNCTIONS --> DISPLAY REPORT NAME to get the report name generated. Copy the report name displayed.
    While using the menu paths for generating program or displaying report name, make sure the query is selected.
    In transaction SE38, give the report name and maintain break points whereever required in display mode and execute the report from se38.
    Edited by: Santhoshi Guttula on Jan 6, 2012 7:44 AM

  • How to debug a query that BI Publisher refuses to accept in a data set.

    Paste query and hit OK.
    Read useless error message.
    Remove all report parameters.
    Remove all function calls.
    Place pairs of parethesis around random bits of code.
    Delete one line at a time from query and attempt to hi OK each time.
    Whittle down your query until it looks something like this:
    SELECT 1 FROM DUAL
    Go to Oracle Open World with a sign reading:
    END THE ORACLE BUG ARMAGEDDON!

    with
    search_box_information_view as
    (select 1 box_id,111222332 control_number,'In Use' status,to_date('1/1/2015','mm/dd/yyyy') destroy_after_date,55 facility_key_fk from dual union all
    select 1,111222333,'In Use',to_date('1/1/2015','mm/dd/yyyy'),1153 from dual union all
    select 2,111222334,'In Use',to_date('1/5/2015','mm/dd/yyyy'),1153 from dual union all
    select 3,111222335,'In Use',to_date('1/7/2015','mm/dd/yyyy'),1153 from dual union all
    select 2,111222336,'In Use',to_date('1/9/2015','mm/dd/yyyy'),55 from dual union all
    select 3,111222337,'In Use',to_date('1/12/2015','mm/dd/yyyy'),55 from dual union all
    select 4,111222338,'In Use',to_date('1/15/2015','mm/dd/yyyy'),55 from dual union all
    select 4,111222339,'In Use',to_date('1/15/2015','mm/dd/yyyy'),1153 from dual
    select box_id,control_number,destroy_after_date,facility_key_fk,
           count(*) over (partition by facility_key_fk) cnt
      From search_box_information_view
    where status = 'In Use'
    order by facility_key_fk,control_number
    BOX_ID
    CONTROL_NUMBER
    DESTROY_AFTER_DATE
    FACILITY_KEY_FK
    CNT
    1
    111222332
    01/01/2015
    55
    4
    2
    111222336
    01/09/2015
    55
    4
    3
    111222337
    01/12/2015
    55
    4
    4
    111222338
    01/15/2015
    55
    4
    1
    111222333
    01/01/2015
    1153
    4
    2
    111222334
    01/05/2015
    1153
    4
    3
    111222335
    01/07/2015
    1153
    4
    4
    111222339
    01/15/2015
    1153
    4

  • How to implement enter-query , execute-query in Apex Forms

    Hi,
    I am new to Oracle Application Express. I want to know what is the equivalent of ENTER-QUERY and EXECUTE-QUERY features of Oracle Forms in Oracle APEX? I saw a lot of documentation, but everywhere I found that APEX forms only have 3 database actions, (1) INSERT (2) UPDATE & (3) DELETE.
    Does anybody know how we can do QUERY in APEX Forms? (like we do in Oracle Developer Forms).
    Thanks in advance.

    Oracle APEX is a web/ stateless environment. So you do not have the same functionality/ features as in a Oracle Forms environment which is session/state oriented.
    You can however achieve functionality similar to Enter Query / Execute Query through other means.
    The easiest is to use the Forms with Report wizard. It creates 2 pages, the first one is a report and the other a Form. Clicking on the Report rows takes you to the Form page in Edit mode where as the the Create button takes you to the Form in Insert mode.
    If you want to have the enter-query / execute query on a single page it will require significant effort and skills. Try it when you have acquired some more skills in Apex.
    In APEX , like any other web application, you have to think in the web paradigm and not client-server. Even Forms 11g is essentially client-server like and is session oriented through the forms applet.
    Regards,

  • Debugging a query

    Hello,
    Sombody provide me how to debug a query
    I could not find good link in sdn
    I am looking step by step Instructions how to debuging a query?
    Advance thaks

    Hi Roy,
    why do you need to debug the query? do you search for information why a specific result appears? If yes, you can execute the query in web or rsrt right click on keyfigure cell and choose keyfigure definition. In that case you will get an explanation about the way the keyfigure is calculated.
    If you would like to find out how queries are executed and how OLAP works, choose the option already provided in the other response.
    best regards,
    Kai

  • How to make dynamic query using DBMS_SQL variable column names

    First of all i will show a working example of what i intend to do with "EXECUTE IMMEDIATE":
    (EXECUTE IMMEDIATE has 32654 Bytes limit, which isn't enough for me so i'm exploring other methods such as DBMS_SQL)
    -------------------------------------------------CODE-----------------------------------
    create or replace PROCEDURE get_dinamic_query_content
    (query_sql IN VARCHAR2, --any valid sql query ('SELECT name, age FROM table') 
    list_fields IN VARCHAR2) --list of the columns name belonging to the query (  arr_list(1):='name';   arr_list(2):='age';
    -- FOR k IN 1..arr_list.count LOOP
    -- list_fields := list_fields || '||content.'||arr_list(k)||'||'||'''~cs~'''; )
    AS
    sql_stmt varchar (30000);
    BEGIN
                   sql_stmt :=
    'DECLARE
         counter NUMBER:=0;     
    auxcontent VARCHAR2(30000);     
         CURSOR content_cursor IS '|| query_sql ||';
         content content_cursor%rowtype;     
         Begin
              open content_cursor;
              loop
                   fetch content_cursor into content;
                   exit when content_cursor%notfound;
                   begin                              
                        auxcontent := auxcontent || '||list_fields||';                    
                   end;
                   counter:=counter+1;     
              end loop;
              close content_cursor;
              htp.prn(auxcontent);
         END;';
    EXECUTE IMMEDIATE sql_stmt;
    END;
    -------------------------------------------------CODE-----------------------------------
    I'm attepting to use DBMS_SQL to perform similar instructions.
    Is it possible?

    Hi Pedro
    You need to use DBMS_SQL here because you don't know how many columns your query is going to have before runtime. There are functions in DBMS_SQL to get information about the columns in your query - all this does is get the name.
    SQL> CREATE OR REPLACE PROCEDURE get_query_cols(query_in IN VARCHAR2) AS
    2 cur PLS_INTEGER;
    3 numcols NUMBER;
    4 col_desc_table dbms_sql.desc_tab;
    5 BEGIN
    6 cur := dbms_sql.open_cursor;
    7 dbms_sql.parse(cur
    8 ,query_in
    9 ,dbms_sql.native);
    10 dbms_sql.describe_columns(cur
    11 ,numcols
    12 ,col_desc_table);
    13 FOR ix IN col_desc_table.FIRST .. col_desc_table.LAST LOOP
    14 dbms_output.put_line('Column ' || ix || ' is ' ||
    15 col_desc_table(ix).col_name);
    16 END LOOP;
    17 dbms_sql.close_cursor(cur);
    18 END;
    19 /
    Procedure created.
    SQL> exec get_query_cols('SELECT * FROM DUAL');
    Column 1 is DUMMY
    PL/SQL procedure successfully completed.
    SQL> exec get_query_cols('SELECT table_name, num_rows FROM user_tables');
    Column 1 is TABLE_NAME
    Column 2 is NUM_ROWS
    PL/SQL procedure successfully completed.
    SQL> exec get_query_cols('SELECT column_name, data_type, low_value, high_value FROM user_tab_cols');
    Column 1 is COLUMN_NAME
    Column 2 is DATA_TYPE
    Column 3 is LOW_VALUE
    Column 4 is HIGH_VALUE
    PL/SQL procedure successfully completed.I've just written this as a procedure that prints out the column names using dbms_output - I guess you're going to do something different with the result - maybe returning a collection, which you'll then parse through in Apex and print the output on the screen - this is just to illustrate the use of dbms_sql.
    best regards
    Andrew
    UK

  • We are interested to know how/where to check query runtimes for any Query in SAP BW?

    We are interested to know how/where to check query runtimes for any Query in SAP BW?
    Is there any table or program to get the query run time details per query for a particular day.

    Hello Sravan,
    Bex statics tables would be 'RSDDSTATHEADER','RSDDSTATINFO' & 'RSDDSTATEVDATA'. all these can found in one view 'RSDDSTAT_OLAP'.
    above can give historical statistic.
    For current Query statics : T-code RSRT, and select debug mode select display statistics and then execute.
    Once you get the output press F3(one step back), there you can see statics of the query for that particular execution.
    Thanks,
    Mallikarjuna

  • HOW TO DEBUG DB COLLECTOR - DATE FORMAT PROBLEM

    Hi All,
    i created a oracle collector. i have a query like below;
    select
    MY_DATE,
    TO_CHAR('MY_DATE','YYYY/MM/DD HH24:MI:SS','nls_date_language=AMERICAN')
    MDATE
    WHERE
    MY_DATE >= TO_DATE('%s','YYYY/MM/DD
    HH24:MI:SS','nls_date_language=AMERICAN') and rownum <= %d
    ORDER BY
    MY_DATE
    and i am returning 'return input.RXMap.col_MDATE;'
    When i run the collector it is giving to me ORA-01840 input value not
    long enough for date format so i want to debug and see the value of %s.
    When run the collector debug mod always saying to me NODATA. Anybody
    know how can debug and how can see %s value ??
    ibasaran
    ibasaran's Profile: https://forums.netiq.com/member.php?userid=2826
    View this thread: https://forums.netiq.com/showthread.php?t=46068

    ibasaran;221632 Wrote:
    > Hi All,
    >
    > i created a oracle collector. i have a query like below;
    >
    > select
    > MY_DATE,
    > TO_CHAR('MY_DATE','YYYY/MM/DD HH24:MI:SS','nls_date_language=AMERICAN')
    > MDATE
    >
    > WHERE
    > MY_DATE >= TO_DATE('%s','YYYY/MM/DD
    > HH24:MI:SS','nls_date_language=AMERICAN') and rownum <= %d
    >
    > ORDER BY
    > MY_DATE
    >
    > and i am returning 'return input.RXMap.col_MDATE;'
    >
    > When i run the collector it is giving to me ORA-01840 input value not
    > long enough for date format so i want to debug and see the value of %s.
    >
    > When run the collector debug mod always saying to me NODATA. Anybody
    > know how can debug and how can see %s value ??
    Make sure you start the event source after you start debugging.
    brandon.langley
    brandon.langley's Profile: https://forums.netiq.com/member.php?userid=350
    View this thread: https://forums.netiq.com/showthread.php?t=46068

  • How to debug a report in webi

    Hi Every One,
    1) How to debug (debuging steps )in  a report in boxir2 webi  based report.can any body help me out .
    2)How we do the performance and tuning in the report level.
    3)Aggregate awareness is possible to apply  in report level  or in universe level.If possible where we can find that option in webi..
    Please help me out
    Thanks in advance

    Hi,
    1. Depends on what you would like to debug - Always remember that Data issues - look into generated SQL and compare with report output ..the values would be the same or at higher level based on output context.
    2. There is not much to do in terms of improving performance in rendering a report. You should ideally concentrate on universe and underlying db performance for query retrieval.
    3. Aggregate awareness is applied at the Universe level. Please refer to the universe designer guide for more details.
    Regards

  • How to copy a query

    Hi everyone,
    Can any one please tell me how to copy a query?
    just explain me the steps....pls
    Thanks in advance,
    Soumya

    Hi,
    If you want to copy the query on same InfoProvider, you can use the 'Save As' option.
    If you want to copy the query from one InfoProvider to other, you can use the transaction RSZC. But InfoProvider structure must be same before using the RSZC option.
    If your InfoProvider structures are not same, then you can use a function module to copy the query.
    There is one function module available to copy the queries from one target to other. We can achieve the copy even if the Source and Target InfoProviders are different.
    Here are the steps..
    Step 1. Bypass the standard functionality.
    Use transaction SE37 and enter the function module name RSZ_I_COPY_QRY_TO_CUBE.
    Set a breakpoint after the line Perform check infocube to manipulate the SAP BW original compliancy check. Search for and set the breakpoint at IF l_subrc 0 OR l_is_compliant = rs_c_false .
    Step 2. At the next stop in coding, enter the InfoProvider name in the occurring dialog in your defined breakpoint. In debug mode, set the return parameter l_is_compliant to X by typing the parameter name l_is_compliant in the field name input box
    Step 3. Copy the query.
    The system next asks you what query to copy The system believes that the target InfoProvider is compliant, but displays the objects that could not be found and copied Step 4. Add the missing elements.
    You can add the missing characteristics manually after copying the query.
    Regards,
    Yogesh

  • How to create Shuttle Item in APEX

    Hi,
    could you please anyone let me know the steps of how to create shuttle item in APEX?
    Thanks for your help
    Thanks
    Sri

    Hi Jitendra,
    Thanks for replying.
    my query like this.
    select * from table1,table2
    where
    table1.value not in 'CABINET' ---- here i need to create shuttle
    and table2.name like 'B%' --- this is just text box
    table3. value is coming from LOV.
    could you please let me know how to create value as shuttle, in shuttle wht are the changes do i need to make changes?
    Thanks
    Sri

  • How to create a query view in sap bw?

    can any one please tell me how to create a query view in sap bw 3.5?

    Hi,
    you can do this by using Bex analyzer and WAD ..
    gop through this link ..
    http://help.sap.com/saphelp_nw70/helpdata/en/0e/1339427f82b26be10000000a155106/content.htm
    http://help.sap.com/saphelp_nw70/helpdata/en/0d/af12403dbedd5fe10000000a155106/frameset.htm
    hope this helps you ..
    Reagrds,
    shikha

  • How to debug in SAP Netweaver Developers Studio?

    Hi there,
    I am trying to debug and slove my error in SAP NWDS.
    I am building portal application->JSPDynPage
    I am trying to debug the jsp code behind page, it doesn't realli give error message like the java beans does.
    I am quite new to this and do not know how to set the function to test and debug this page can anyone provide any solution ?
    I have have this prob pls refer to this link
    <a href="https://www.sdn.sap.com/irj/sdn/thread?threadID=192104">https://www.sdn.sap.com/irj/sdn/thread?threadID=192104</a>
    Thanks loads
    Quatre

    Hi Quatre ,
    -Select the breakpoints in your Dynpages /beans in ur project
    -To debug u have to change the prespective to debug which u can find in
    window/open prespective /Debug in NWDS
    -Select the Run/Debug or the Debug icon in the toolbar.
    -Fill the project name ,application name in  the in the wizard opnend .
    - Follow the debugging using the next step over F6 ,step return F7 keys .
    These link may be helpful:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/66/547f09281d464b951c9a3a6b06a12d/frameset.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/a8/def86ab54da5418a3575373934ca00/frameset.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/d4/31e24044b80b06e10000000a155106/frameset.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/be/cffcb407c67842b122bd1296dc810f/frameset.htm
    U can always find out the way in the PDK development /how to debug/
    ie in NWDS /HELP /SAP WAS AS Documentation /SAP J2ee Enterprise Java Beans/Java development User Guide /Running and Debugging
    Cheers,
    Swathi Rao
    Do offer pts:-)

  • How to debug web app with weblogic?

    I wrote a web app that includes jsp files and some javabeans, then I put the jsp files to directory
    mydomain\applications\DefaultWebApp
    then I complied javabeans and put those classes to
    mydomain\applications\DefaultWebApp\WEB-INF\classes
    Then I start the weblogic,it runs very well.
    I modified some javabean, complie them and put classes override the old classes,
    but the web app can not find the new classes.
    Any one know How to debug web app(with javabeans) in weblogic?
    thanks!

    how to config the hot deploy?
    thxSorry, for this delay in responding. I had set notify me with email option in Watch This topic; but I never did get any email notification.
    I use wls6.1; I think the process may be very similar to this in wls8.x. In wls6.1 (sp5), this is done via the -
    Dweblogic.ProductionModeEnabled=False or
    Dweblogic.ProductionModeEnabled=True
    in the startup cmd/sh script. Out of the box, wls6.1 is set to Dweblogic.ProductionModeEnabled=False which automatically enables hot deploys.

  • How to get the query values from the url in a servlet and pass them to jsp

    ok..this is the situation...
    all applications are routed through a login page...
    so if we have a url like www.abc.com/appA/login?param1=A&param2=B , the query string must be passed onto a servlet(which is invoked before the login page is displayed)..the servlet must process the query string and then should pass all those values(as hidden values) to the login jsp..then user enters username and pswd, then there should be another servlet which takes all the hidden values of jsp and also username and pswd, authenticates the user and sends the control back to that particular application along with the hidden values...
    so i need help on how to parse the query string from the original url in the servlet, pass it out to jsp, and then pass it back to the servlet and back to the original application...damnn...any help would be greatly appreciated...thanks

    ok..this is the situation...Sounds like you have a bad design on your hands.
    You're going to send passwords in a GET request as clear text? Nice security there.
    Why not start with basic security and work your way up?
    %

Maybe you are looking for