Item Selection on a dynamic LOV (SQL Query)

Hi,
I've a dynamic LOV with an SQL query who return a list of data (one column). When i select a data in this LOV to be use as an item (sql query) in the same page the data is always null. In debug mode substitution string is null.
FYI : when the data is selected, a button is clik to perform an sql query for a report in another page.
Thanks. Sorry Abasolute beginner
Message was edited by:
user581765

Thanks for Your help.
The date is in fact a CHAR display (not really a date) so that is not the error.
For your information when i select a row in the list (format char YYYYMMDD_HHMM) it seems that Apex do not catch my select in the Session state.
I've change the item name with P2_DATE_FLOW but the problem remain.
This is the debug log if can help
0.03: Application 114, Authentication: CUSTOM2, Page Template: 3644802034190382
0.06: ...Session ID 1868105032215374 can be used
0.06: ...Application session: 1868105032215374, user=Neop
0.06: ...Determine if user "Neop" workspace "2859608277950243" can develop application "114" in workspace "2859608277950243"
0.06: Session: Fetch session header information
0.06: ...Metadata: Fetch page attributes for application 114, page 3
0.06: Fetch session state from database
0.06: Branch point: BEFORE_HEADER
0.06: Fetch application meta data
0.08: Computation point: BEFORE_HEADER
0.08: Processing point: BEFORE_HEADER
0.08: Show page template header
0.08: Computation point: AFTER_HEADER
0.08: Processing point: AFTER_HEADER
0.08: Computation point: BEFORE_BOX_BODY
0.08: Processing point: BEFORE_BOX_BODY
0.08: Region: Report 1
Report 1
0.08: show report
0.09: determine column headings
0.09: parse query as: CFM_MDRE
0.12: binding: ":P2_DATE_FLOW"="P2_DATE_FLOW" value="0"
0.14: print column headings
0.14: rows loop: 15 row(s)
No data found.

Similar Messages

  • Dynamically Pass sql query in Database adapter

    hi',
    How can we dynamically pass sql query in Database adapter, is there any way, I am using SOA 11G.
    Thanks
    Yatan

    Hi,
    Tried that too. No luck. Gives me this.
    The selected operation process could not be invoked.
    An exception occured while invoking the webservice operation. Please see logs for more details.
    oracle.sysman.emSDK.webservices.wsdlapi.SoapTestException: Exception occured when binding was invoked.
    Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'selectUsingIn' failed due to: Pure SQL Exception.
    Pure SQL Execute of select interface_id, property_name, property_value from ( (?) ) failed.
    Caused by java.sql.SQLSyntaxErrorException: ORA-00903: invalid table name
    The invoked JCA adapter raised a resource exception.
    Please examine the above error message carefully to determine a resolution.
    Regards,
    Neeraj Sehgal

  • How-To populate SELECT LIST default value from SQL Query

    OK, I've done my homework, and did not find my answer in the Forum, so here it is.
    I have a Page that displays fields from a SQL Query. The Page also has below that radiogroups, checkboxes, and Select Lists to allow the user to change values in the fields that are displayed at the top of the Region. I am able to pre-populate the radiogroups and checkboxes by performing a SELECT in the 'Source value or expression' of the Source area of the Page Item.
    However, I am unable to do the same for the Select List fields. Their default value ends up being the first value in the LOV ('-- None --' for NULL values). Source Used: Only when current value in session state is null. Source Type: SQL Query. Also, when I first go into the Page when running it, and check the Session State values, they are all null, so I don't understand why the field is not populated by the SQL Query statement as the radiogroups and checkboxes are.
    Any suggestions??? I've tried all sorts of combinations.

    Thank you for the suggestion.
    I had considered that, but cannot do so, because we are using Oracle Application Express more for development than for data containment.
    We have all our data in an Oracle 10.g DB which is separate from the OAEX server, and the OAEX app will reference that data via VIEWs and DB LINKs. We are doing so primarily as an added data security layer, where the data is housed separate from the app, in case the Web site is ever compromised. The data that can be viewed is restricted to a subset of the actual data that is available.
    Since the data is on a separate server, (I assume) we will not be able to set the source type to Database column, because (I asume) that is dependent upon the data being housed by the OAEX server.
    That still leaves me with having to populate the field with a SELECT statement from the Oracle DB. This unfortuneately is almost a show-stopper for me because of down-stream processing data requirements. Have not been able to come up with contingencies yet.

  • Dynamically change sql query (from statement)

    Hi all,
    Is it possible to change the 'from statement' dynamically in
    report 6i? I have 3 identical tables with different names (each
    to collect data in different area) and I want to be able to
    dynamically change the sql query at run time so I can use only
    one (1) report to print data in 3 different tables.
    Is it possible? Thanks for the tip!

    Yes you can. Create a user parameter lets say "frm". give the
    initial value for the parameter as the table a. Ex : FROM EMP .
    Go to the datamodel of the report . Change the query like this,
    Original query => Select * from emp
    Modified query => Select * &frm
    Coz frm has the default value FROM EMP, so it will replace the
    default value. When you call the report from differrent product
    you can pass the parameter value as table a, table b , table x.
    Hope you got your answer.
    Thanx
    Feroz

  • LOV SQL query dependent on column value

    Hi Gurus,
    I have a tabular form, a column of which I would like to display as a dropdown whose list of values is a SQL query containing a where clause on another column value.
    For example, say the tabular form displays questions, and that the answers to the different questions are to be picked in list of values that are different for each question. I have tried the following queries for the dropdown list of values:
    1- select value_text, value_text from list_of_values_table where question_id=#QUESTION_ID#
    2- select value_text, value_text from list_of_values_table where question_id=:QUESTION_ID
    3- select value_text, value_text from list_of_values_table where question_id=&QUESTION_ID.
    In the 3 cases, I get an error when I run the application saying that the SQL statement is incorrect.
    Any ideas?
    Thanks in advance,
    Guillauem

    Anton,
    Yes, I am creating a region based on a sql query. The query is the following:
    select q.id quest_id, q.name, q.data_type_id, q.lov_flag, a.id answer_id, a.answer_text, a.org_id
    from gwb_questions q left join gwb_answers a on q.id=a.question_id, gwb_answers ans right join gwb_orgs o on ans.org_id=o.id
    where q.MODULE_ID=:P2_MODULE_ID and o.id=:P2_ORG_ID
    Now, in the 'answer_text' column, I would like to display a dropdown containing values that come from a separate table and that depend on the value of the quest_id column. So in the Column Attributes for 'answer_text', I selected Select List (query based LOV) for the Tabular Form Element, and I entered the query mentioned before in the List of Values section (select value_text, value_text from list_of_values_table lov where lov.question_id= ?).
    I am not using any API.
    Does that make sense?
    Thanks for your help,
    Guillaume

  • Xml parsing error while selecting whole result set for sql query

    Hi All,
    I am having xml parsing error while selecting whole query result set. The data is coming fine for default result set of 50 rows.
    My exception is below.
    ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LPX-00234: namespace prefix "xsi" is not declared
    Error at line 1
    ORA-06512: at "SYS.XMLTYPE", line 254
    ORA-06512: at line 1
    *31011. 00000 - "XML parsing failed"*
    **Cause: XML parser returned an error while trying to parse the document.*
    **Action: Check if the document to be parsed is valid.*
    My sql query is below that is giving results for default result set of 50 rows.
    select extract(xmlType(clob_xml_colm_name), '//v2:node1//childnode/text()','xmlns:v2="namespace_url"').getStringVal()  from table_name
    My sql developer version is below.
    Java(TM) Platform     1.7.0_04
    Oracle IDE     3.1.07.42
    Versioning Support     3.1.07.42
    My database version is below.
    Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit
    Please could any one help me urgently as the sql query is supposed to be correct as it is returning query results, but the problem happening when i try to select whole result set.
    Thanks and regards,

    What does the XML look like? It appears that some of the supposed XML stored as a CLOB is not really valid XML. Find the row in the table that is causing your issue and review the "XML" in it.

  • How do you include static text in select statement in Dynamic pl/sql

    I want to include some atatic text and get the output of 4 columns joined with a ":" delimiter within them in a select statement built using Dynamic PL/SQL. How do I build it.
    e.g.
    Normal select statement would be
    select 'MY SKU IS : ', col1||':'||col2||':'||col3||':'||col4 from table1 where ....where condition
    and output looks like :
    MY SKU IS A:B:C:D
    MY SKU IS a:b:c:d
    Dynamically I have -
    SQL_Stmt := 'select 'MY SKU IS : ', col1||':'||col2||':'||col3||':'||col4 from table1 where '|| wherecondition;
    I understand that this does not work because the single quote terminates the string. But my question is how do I achieve the same result with dynamic PL/SQL ? How do I include the static strings and the delimiters. I have tried using double quote, '\'....
    ????

    SQL_Stmt := 'select ''MY SKU is ' || col1 || '':'' ||
                                         col2 || '':'' ||
                                         col3 || '':'' ||
                                         col4 ||
                 ' from table1 where ' || wherecondition;

  • How do I pass selected values from dynamic LOV to Command SQL in Oracle

    My environment:
    Crystal 11
    Oracle 10
    I've created and tuned a SQL script for a report.  In the Database Expert, I've copied the SQL into a Command.   I've modified the Command to create 3 parameters. 
    I need help with the following:
    1) How do I create a dynamic, cascading LOV and associated prompt group for the three parameters defined in the Command?
    2) How do I pass the user selected valueS from the prompt group into the Command SQL as limits applied to the query executed against the database?

    I have the same problem with same environment .
    The main report is having a  2 level cascading dynamic parameters.
    I created a sub report with a command as below.
    *select * from (*
    select DATUM,MSEC,CNT,B1_NAME,B2_NAME,B3_NAME,ELEM_NAME,INFO_NAME,m.INFOTYPE,V.NAME,rank()
    over (partition by B1_NAME,B2_NAME,B3_NAME order by DATUM desc ,MSEC desc,CNT desc) currentRank
    from MESSAGES m,INTYDE i,VANAME v
    where  DATUM <=SYSDATE  and trim(B1_NAME)='{?B1Name}'
    and trim(B2_NAME)='{?B2Name}'
    and m.INFOTYPE=i.INFOTYPE
    and i.VALUE_NAME_NUMBER = v.VALNUM) where currentRank=1
    I needs to pass cmbination of B1Name and B2Name from main report. I created a formula like
    formula=Join({?B1Name},{?B2Name}),'|');  But this is showing some error.
    and How I will substitute this in my command . As I new to Crystal XI  help expected.

  • Set Page item value when paging through an sql query report

    I have a report that includes a checkbox to indicate which rows a process is to be run on. I have a "Select All" button that sets a value to check all boxes in the report, and deselect button to turn that feature off. The page only renders one of the buttons at a time depanding on the value. If the "Select All" is turned on, I would like to set the value to "OFF" when a user goes to another page of the report.
    For example:
    A user enters the page and the report is rendered. The rows returned are greater than what is displayed. The paging options for the report are shown. 1-15 16-30 etc. It is currently showing the first 15 rows of the report.
    The user clicks the select all button, and all checkboxes are now checked. Currently it will remain this way until the deselect button is clicked.
    When the user clicks the report paging, I would like to set the value of the Select All item to off.
    Does anyone know how to do this at this point?

    Hi,
    Try Scott's suggestion in Re: How to get query from region "PL/SQL function body returning string query"?
    Andy

  • Update select list with dynamic LOV

    How exactly do you do this?
    Currently I have a text field which the user may enter a product type and a button when click. It would populate the select list with the product names that associate with that product type...
    My lov would retrieve the product type value text field(:P1_t_prod_type) and get products names by type
    select t_prod_name A , t_prod_name B
    from t_prod_items
    where t_prod_type = :P1_t_prod_type
    order by 1Im kind of stump on is setting up my dynamic action to "set value" to the select list. As nothing seems to be appearing.

    product type is a numeric value that can be a wide numeric range. (I don't know why the column is named like that. Sorry for forgetting to mention that)
    Well I don't think i should submit the page? because after the list box is filled with product names. the user can then select one of those names from the list box and continue completing the rest of the form. After all that the page would then be submited. (Well that's how i imagine it to work...)
    Wouldn't i run into problems if i were to submit the page twice... like lost entry in other text fields if the user were to skip that part at the start.

  • How to pass variable into lov sql query using like operator

    hi.
    i want to use a lov where i want to pass a variable using like operator.
    my query is
    select empno,name from table where empno like ':ed%';
    my empno is A001 TO A199 AND B001 TO B199 so i want show either A% or B% empno
    how can i do this ?
    reagrds

    kindly press Shift+F1 at a time you face this error to see the exact Oracle error message.
    and provide us with that detail
    and its better if you start new topic for that error... because that will be new error,,,
    -- Aamir Arif
    Edited by: Aamiz on Apr 7, 2010 12:27 PM

  • Generating report based on dynamically generated sql query

    I have to rewrite asp reports to oracle reports.
    The original application has forms in asp where reports are generated dynamically based on the options selected.
    There are many options to select.
    Some add filter criteria to where clause.
    I have no problem with this. As i can generate report using parameter form.
    whereas i don't know how to generate reports whose columns change based on the user selection.
    The front end screens are going to be in java and jsp pages. The only way i can think of is generating reports on all possible options the user may select. But, as there are more than 15 options, i think this is not the right approach.
    How can i achieve this.
    Thank you very much.
    navya.

    One method that comes to mind would be to use an after parameter form, and use lexical parameters to create dynamic statements.
    For example in your after pform:
    If :P_NAME = 'JOHN' then
    :P_SELECT = 'SELECT COL1, COL2 ';
    :P_FROM = 'FROM JOHN ';
    :P_WHERE = 'WHERE COL3 = 'JOHN';
    END IF;
    Then in your query, you could say:
    &P_SELECT
    &P_FROM
    &P_WHERE
    Something like that - If only parts of you where statement will change, you can just write that one part -
    like
    IF :P_STATE is not null then
    :P_STATE = ' and table.state = :P_STATE_IN ';
    else :P_STATE = ' and 1=1 ';
    end if;
    and in your query...
    where....
    &:P_STATE
    So IF a person enters a state, then limit the search to that state, or else do a 1=1.
    Hope this gives you a start

  • Dynamically extracting SQL query costs/statistics at runtime

    Hi there,
    I need to measure the I/O cost (such as 'physical reads')of a SQL statement at runtime. What I'm looking to do is to test the total cost of a number of queries in a java program. So I need to get the cost automatically and add them up.
    There are a few tools that can give statistics on I/O cost, such as autotrace, but I need to collect these information using Java through JDBC.
    Any pointers?
    Also I am a little confused about the terms used in oralce. What I need is the number of db blocks accessed by the query, either from buffer or disk. Are these referred as 'logical read' and 'physical read' respectively? Or are 'logical read' and 'physical read' just mean the number of reads?
    Thank you,

    Logical and consistent reads are against the DB Buffers, Physical reads are disk io. When evaluating the cost of a query, pay attention to an abnormally high number of logical reads. This is usually an indicator of a poorly performing query ie a correlated sub-query.

  • Select List (based on LOV) query problem

    Hello experts! I have a small problem here, which I can't seem to overcome.
    I have a page item (select list based on LOV), which is based on a query. The query returns all potential employees of a department that are responsible for a certain duty. So far so good!
    The problem is that there are two departments, which should not only see there own employees but also the name of the employee that has carried out a certain task. However, due to my query, the name of that person is not displayed - only the pk is returned.
    Do you have a recommendation how I display all employees of a specific department and have additional values translated as well?
    My query is as follows: select str_bearbeiter, cnt_bearbeiter from vt_tbl_bearbeiter where cnt_bearbeiter in (SELECT
    CNT_REGIERUNGSBEZIRK FROM TBL_REGIERUNGSBEZIRK) union select str_bearbeiter, cnt_bearbeiter from vt_tbl_bearbeiter where int_behoerde in (SELECT
    CNT_REGIERUNGSBEZIRK FROM TBL_REGIERUNGSBEZIRK where STR_REGIERUNGSBEZIRK = lower (:app_user)) whereas :app_user holds the information of the department.
    Any hint is appreciated!
    Many thanks,
    Seb

    Okay, I just had the right idea and it's working well! Sorry for posting!
    I return the name of the employee that has edited a dataset and simply add all others of the logged on department! Really easy! Should have thought of that before posting! ;-(
    The correct code is select str_bearbeiter, cnt_bearbeiter from vt_tbl_bearbeiter a, vt_tbl_punktdaten b where a.cnt_bearbeiter = b.int_bearbeiter and
    inv_pt_id_sub = :P4_PTIDS
    union select str_bearbeiter, cnt_bearbeiter from vt_tbl_bearbeiter where int_behoerde in (SELECT
    CNT_REGIERUNGSBEZIRK FROM TBL_REGIERUNGSBEZIRK where STR_REGIERUNGSBEZIRK = lower (:app_user))Bye,
    Seb

  • Different LOV behavior between SQL query data model and data template

    I have noticed different behavior when using parameters linked to list of values (LOV) of type menu with the multiple selection option enabled and a SQL query data model vs a data template. Here's the example because that first sentence was probably really confusing.
    SQL Query:
    select
    plmc.MonthCode, plmc.ModalityDim, plmc.ModalityName,plmc.RegionDim
    from
    DataOut.dbo.PatientLabMonthlyCross plmc
    where
    plmc.MonthCode = 200202
    and plmc.RegionDim = 1209
    and 1 =
    case
    when coalesce(:modalityDim,null) is null
    then 1
    else
    case
    when plmc.ModalityDim in (:modalityDim)
    then 1
    else 0
    end
    end
    Putting BI Publisher into debug mode, defining a data model of type SQL Query, defining a parameter called :modalityDim linked to a LOV that allows multiple selections, and selecting a couple of values from the LOV the output of the prepared statement is:
    [081607_122647956][][STATEMENT] Sql Query : select
    plmc.MonthCode,
    plmc.ModalityDim,
    plmc.ModalityName,
    plmc.RegionDim
    from
    DataOut.dbo.PatientLabMonthlyCross plmc
    where
    plmc.MonthCode = 200202
    and plmc.RegionDim = 1209
    and 1 =
    case
    when coalesce(?,?,null) is null
    then 1
    else
    case
    when plmc.ModalityDim in (?,?)
    then 1
    else 0
    end
    end
    [081607_122647956][][STATEMENT] 1:6
    [081607_122647956][][STATEMENT] 2:7
    [081607_122647956][][STATEMENT] 3:6
    [081607_122647956][][STATEMENT] 4:7
    [081607_122654713][][EVENT] Data Generation Completed...
    [081607_122654713][][EVENT] Total Data Generation Time 7.0 seconds
    Note how the bind variable :modalityDim was changed into two parameters in the prepared statement.
    When I use this same SQL Query in a data template the output is:
    [081607_012113018][][STATEMENT] Sql Query : select
    plmc.MonthCode,
    plmc.ModalityDim,
    plmc.ModalityName,
    plmc.RegionDim
    from
    DataOut.dbo.PatientLabMonthlyCross plmc
    where
    plmc.MonthCode = 200202
    and plmc.RegionDim = 1209
    and 1 =
    case
    when coalesce(?,null) is null
    then 1
    else
    case
    when plmc.ModalityDim in (?)
    then 1
    else 0
    end
    end
    [081607_012113018][][STATEMENT] 1:'6','7'
    [081607_012113018][][STATEMENT] 2:'6','7'
    [081607_012113574][][EXCEPTION] java.sql.SQLException: Syntax error converting the nvarchar value ''6','7'' to a column of data type int.
    Note the exception because it is trying to convert the multiple parameter values.
    Am I doing something completely wrong here? I really need to use a data template because I will need to link a couple of queries together from different database vendors.
    -mark

    This is for 10.1.3.4 - because in 11g every SQL query is automatially part of a data model.
    In 10g SQL query is for simple unrelated SQL queries.
    If you need to use advance features such as:
    a) multiple SQL queries that are joined in master-detail relation ships
    b) before/after report triggers
    Then you will need to use the data template, which is an XML description
    of the queries, links, and PL/SQL calls.
    hope that helps,
    Klaus

Maybe you are looking for

  • IMac no longer sharing on home network

    I am having problems using my iMac on on my network at home. It is only about 6 months old and all of the features I am having problems with have previously worked without problems. The main issue appears to be that while my iMac is able to connect t

  • Why is hotmail is not working with Firefox?

    I can log into hotmail then the "Messenger" tab just shows "loading". Whatever I click on nothing happens. If I go to Hotmail through Explorer everything works fine. How to I correct the problem through Firefox?

  • HT204053 do i need credit card to open my apple i d

    how do i open apple i d. i was told i need credit card but i have no idea where it goes as they never asked for one

  • Mail gets frozen after update 10.5.6

    Hi, I'm an active Mail user, i check it every day and after I installed the nw update, like 3 months ago, everytime I open the Mail app, it starts looking for new Mails and the app gets freezed. Nothing happens, i have to restart it and it's the same

  • Unable to read file using Connector.open

    I have written following code to display contents of file on mobile but it is not working and displays nothing. Please Tell me where i am wrong. FileConnection conn; InputStream ip; StringBuffer str=new StringBuffer(); public void startApp() { displa