Generate and execute query dynamically ?

Hi Steve,
i repeate my question, can you help me ?
Can you show into my previous message "Last Post from March 15, 2000 02:27PM Syntax problem ...."
Many thanks for your help !
Achim

Hi Steve,
many thanks for your answer.
Please forgive me for my penetrante question.
Your answer is not solving my problem. I want to create many SQL-query-blocks with your XSQL-processor combined with a stylesheet (however!). I want insert the result of this SQL-creation framework into a normal XSQL-servlet using the <xsql:include-xsql reparse=yes> statement.
What must I do, that this generated, included XSQL-queries would be excecuted in your engine ?
<MyPage xmlns:xsql="urn:oracle-xsql">
<xsql:query>SELECT...... </xsql:query>
<xsql:query>SELECT...... </xsql:query>
<xsql:query>SELECT...... </xsql:query>
</MyPage>
I want to realize the reactor pattern like in COCOON.
Many thanks for your help.
Achim
Example:
<!--?xml-stylesheet type="text/xsl" href="test.xsl"?-->
<page connection="conToDB" xmlns:xsql="urn:oracle-xsql">
<xsql:query>
select SYSDATE from DUAL
</xsql:query>
<xsql:query>SELECT mtime,mnr FROM [email protected] where mnr= ( select min(mnr) from [email protected])</xsql:query>
<xsql:include-xsql href="ViewOrgVersuche.xsql" reparse="yes" />
</page>
Result:
<?xml version="1.0" ?>
- <!-- ?xml-stylesheet type="text/xsl" href="test.xsl"?
-->
- <page>
- <ROWSET>
- <ROW num="1">
<SYSDATE>2000-03-21 13:27:40.0</SYSDATE>
</ROW>
</ROWSET>
- <ROWSET>
- <ROW num="1">
<MTIME>1997-07-23 15:49:12.0</MTIME>
<MNR>1</MNR>
</ROW>
</ROWSET>
- <MyPage xmlns:xsql="urn:oracle-xsql">
<xsql:query>SELECT mtime,mnr FROM [email protected] where mnr= ( select min(mnr) from [email protected])</xsql:query>
<xsql:query>SELECT mtime,mnr FROM [email protected] where mnr= ( select max(mnr) from [email protected])</xsql:query>
<xsql:query>SELECT mtime,mnr FROM [email protected] where mnr= ( select min(mnr) from [email protected])</xsql:query>
<xsql:query>SELECT mtime,mnr FROM [email protected] where mnr= ( select max(mnr) from [email protected])</xsql:query>
<xsql:query>SELECT mtime,mnr FROM [email protected] where mnr= ( select min(mnr) from [email protected])</xsql:query>
<xsql:query>SELECT mtime,mnr FROM [email protected] where mnr= ( select max(mnr) from [email protected])</xsql:query>
<xsql:query>SELECT mtime,mnr FROM [email protected] where mnr= ( select min(mnr) from [email protected])</xsql:query>
<xsql:query>SELECT mtime,mnr FROM [email protected] where mnr= ( select max(mnr) from [email protected])</xsql:query>
<xsql:query>SELECT mtime,mnr FROM [email protected] where mnr= ( select min(mnr) from [email protected])</xsql:query>
<xsql:query>SELECT mtime,mnr FROM [email protected] where mnr= ( select max(mnr) from [email protected])</xsql:query>
<xsql:query>SELECT mtime,mnr FROM [email protected] where mnr= ( select min(mnr) from [email protected])</xsql:query>
<xsql:query>SELECT mtime,mnr FROM [email protected] where mnr= ( select max(mnr) from [email protected])</xsql:query>
</MyPage>
</page>
null

Similar Messages

  • How to implement enter and execute query in ADF

    I am new to ADF and I am trying to create a simple data entry screen in ADF 11g based on a database table. I am looking to implement the equivalent of the Enter Query and Execute Query feature in Oracle Forms. I tried the default operations that are available with the data controls. But they don't seem to have this feature. Can someone help me / point me to how this can be implemented.
    Thanks,
    Srini.

    Thanks Shay. As per your suggestion I have included the Find and Execute buttons for the VO Object and ran the page. I first clicked the Find button and entered by query condition and then clicked the Execute button. At this point I get an error popup asking me to enter values for all the mandatory fields. Am I missing something?
    Regards,
    Srini.

  • Enter and execute query in ADF

    Hi Experts,
    I am trying to implement Enter-Query/Execute-Query in adf and using Jdev 11.1.2.2.0. I put Find and execute operation on the form. When i press execute button i says me to enter value for mandatory fields. But i am try to execute query not trying to create or update records. In forms we can query on any attribute.
    Please guide
    Thanks

    Enter and execute query in Oracle Forms starts with a simple row by row form for updating a table. When you press the "Enter Query" button, the form clears and the user can enter query by example criteria for any of the fields on the form. Then the user presses the "Execute Query" button, and is back in the update form, but with the data for the first matching row shown.
    Here is a page with some links to articles by Steve Muench that explains some ways to implement this in ADF 10.1.3 - I think these techniques should still work in ADF 11g:
    http://radio-weblogs.com/0118231/2006/02/13.html#a658
    Another way with ADF 11g might be to put an af:query component in one facet of an af:switcher and the update form in the other facet. The Enter Query button on the update form tells the switcher to switch to the query facet, and executing the query also tells the switcher to switch back to the update form.

  • Which block get effected by save and execute query

    Hello,
    I'm using forms 9i , database oracle 9i.
    Case:
    i made a simple application with 4 stack canvas on each i place data from 4 tables. convention is like every stack canvas get visible when the corresponding button is pressed. once visible i don't set it to invisible i just place other stack canvas over it.
    Although i don't get any error or problem while doing normal work like saving records or Executing query. but i don't understand whether these operation only effect the table which is visible(on stack canvas). and rest of are unaffected.
    if No then how i can do it with only on visible canvas
    and if yes is there any way that i can do execute query on all of them.
    thanks
    Rahul.

    The SAVE (COMMIT_FORM or COMMIT) will affect the whole form if you are using simple blocks based on tables, every block that does have changed or new data it will saved in the database.
    The EXECUTE_QUERY will affect only the current block, the block where the cursor is in currently. If this block is a master block then the EXECUTE_QUERY on the master block will also affect the detail block.
    If it's a standalone (not a master) block, the EXECUTE_QUERY will only affect the block your cursor is in.
    Tony

  • What role is required to open and execute query in BE query designer

    Hi,
    Am new to BE, need to know what role should i be assigned with to open and execute  a query in query designer.
    OPEN dialobox displays "NO role availabe".
    Is this a problem of role assignment or am i missing some steps
    thanks
    srikanth

    IN Enterprise portal plz check whether these roles are present or not.
    pcd:portal_content/com.sap.pct/platform_add_ons/com.sap.ip.bi/Roles/com.sap.ip.bi.business_explorer_showcase
    pcd:portal_content/com.sap.gm.cnt/core/VCRole
    pcd:portal_content/com.sap.pct/platform_add_ons/com.sap.ip.bi/Roles/com.sap.ip.bi.bi_showcase
    pcd:portal_content/administrator/content_admin/content_admin_role
    pcd:portal_content/com.sap.pct/platform_add_ons/com.sap.ip.bi/Roles/com.sap.ip.bi.business_planning_showcase
    pcd:portal_content/every_user/general/eu_role
    in BW front end , you have to create role with the auth objects S_RS_COMP, S_RS_COMP1, S_RS_MPRO, S_RS_ICUBE auth objects.
    include the t-codes if necessary. RSRT you can include.
    Hope this would help you.

  • Execute (Quit and Execute Query) button not showing up ...

    Hi Gurus,
    I recently installed SAPGUI on a different laptop which never had before.Everythng was fine but when I open BEx and start a new query, I do not see the green circle with check mark on it. This button is used to execute the query.
    I did uninstall and re-install it, but it never helped. Please help ASAP. I will assign points.
    Rgds,

    Hi Matt,
    It could be that the image has gone missing from the server. In a region's Region Header or Region Footer, add in:
    &lt;img src="#IMAGE_PREFIX#themes/theme_3/button_xp_center_FFFFFF.gif" alt="" width="4" height="24" /&gt;Do you see the image?
    #LINK# is created from the button name, usually as: doSubmit('BUTTONNAME'). #LABEL# is the label you have set for the button. Neither should affect the image display as that is actually part of the TD tag itself.
    Andy

  • Call form and execute query

    Hi All
    i have two forms one form is sale_order and other is order tracker what i want when i press the button
    sale order cotains information about the every sale with a unique ID
    and order tracker contains list of all orders i want a button on order tracker when-button pressed then open the sale_order and execte the sale_order as the id is selected in order tracker
    Thanks And Regards
    Vikas Singhal

    Hi My code is
    in order tracker i wrote this code
    :global.my_id := 'id';
    open_form('c:\test_report\sale_order');
    execute_query;
    the sale order form is opened but not execute the sale_order in order_tracker is id=111
    in sale order where what should i do please guide where i do the id=global.id
    Thanks And regards
    Vikas Singhal
    Edited by: vikas singhal on Jun 23, 2009 11:07 PM

  • F11(Query mode) and Execute Query in Oracle Forms

    Hi Experts,
    I am working with EBS11.5.10.2 and database 9i. I am working on forms, i am new to forms.
    Could somebody help me how to achieve F11(query mode) functionality in APPS forms.
    Thanks in advance.

    Hello,
    Wrong forum. Ask the Personalization question in the dedicated E-Business Suite forum.
    Francois

  • Call form and execute query there

    hi
    i have already one form and i created another form with one text-item named Code(non-base item) and i want when i enter number and click on button and it execute all records in main form with the same code which one i enter in sub form.is it possible if its possible plz guide me thanks in advance
    sarah

    Hi!
    From the main form call the sub form with the call_form build-in like this:
    begin
    default_value ( null, 'global.code );
    call_form ( 'sub_form', no_hide, no_replace, no_query_only );
    if
      :global.code is not null
    then
      go_block ( 'your_block' );
      set_block_property ( :system.cursor_block, onetime_where, 'code = :global.code' );
    end if;
    erase ( 'global.code' );
    go_item ( :system.trigger_item );
    end;In the sub form write to your when-button-pressed trigger:
    begin
    :global.code := :your_block.code;
    exit_form ( no_validate );
    end;Hope that helps
    Edited by: Magoo on 30.08.2009 17:46
    Edited by: Magoo on 30.08.2009 17:59

  • How to set the bind variable on page load and execute query ?

    Hi All,
    I am using Jdeveloper 11.1.1.5
    I have a table called "Employee"
    Columns :- id , name , location
    Data :- 1, ,james , chicago
    2 ,Raj ,capetown
    Now i have another webservice(created as a webservice dataControl) which sends me the "id" on each time my page loads.Now the id which has been returned by webservice should be incorporated in my VO Query as in where clause to fetch the data for the respective "id" in that "Employee" table and should be rendered on form.
    Eg :- Id "2" has been sent by the webservice then the record should be fetched from database should be "2","raj","capetown".
    I know that there would be necessity of bind variable , but how do i set the bind variable on page load ?
    How can i use the bind variable appropriately ??
    Please suggest !!!!
    Thanks.

    Hi,
    Check
    http://www.orastudy.com/oradoc/selfstu/fusion/web.1111/b31974/web_services.htm#CJADCDBG
    http://thepeninsulasedge.com/frank_nimphius/2011/02/18/adf-code-corner-sample-73-released-hands-on-creating-a-search-form-using-a-pojo-ws-and-the-web-service-data-control/
    -Suresh

  • Quick Sales Order Form Enter Query(F11) and Execute Query(Clt+F11) Problem

    Hi Everyone,
    I am having a Problem in Quick Sales Order Form. When I am entering a New Sales Order and Book the Order it is working fine. And Now I want to Query the Sales Order If the Same New Order Number has Queried then It is Properly Queried. But If I am trying to Query Some Other Existing Sales Order other than the new one then It Shows the Error Messgae as Query Caused No Records to be Retrived. We have R12 12.1 Instance.
    Can anyone Helpme in Solving this Issue will be highly appriciable.
    Advance Thanks for your Efforts.
    Regards,
    Murugan. AR.

    Was this working before? If yes, any changes have been done recently?
    Have you tried to regenerate the form via adadmin and see if it helps?
    Do you have any invalid objects in the database?
    You may try to obtain the FRD log file and see if more details about the issue are collected in the logs.
    Note: 438652.1 - R12: Forms Runtime Diagnostics (FRD), Tracing And Logging For Forms In Oracle Applications
    Note: 445166.1 - How to create a FRD (Forms Runtime Diagnostic) Log in EBusiness Suite R12 using Forms 10g
    Thanks,
    Hussein

  • Problem in enter-query and execute-query in TEMPLATE.fmb in Oracle Apps R11

    I have created the form using TEMPLATE.fmb in Oracle Apps R11i. There is 2 problems listed below when it queries the records:-
    1) Cannot query the record by the specific value e.g. Cannot retrieve the PO records by entering the specific PO number.
    2) Always display the message 'Do you want to save the record?' whenever the <ENTER-QUERY> key (i.e. F11) is pressed.
    HOWEVER, it works fine for ALL records without entering any specific values.
    Does anybody help to solve these two problems? Any hints? Thanks for any helps.

    try setting the block status to query or record
    status to new prior to getting in the enter-query
    mode.
    Thanks
    TapashHi Tapash, Dun understand.. please give more details.. Thanks.

  • Oracle ADF Find and Execute in form

    Hi,
    I have followed the blog for creating a form which allows for searching. I am executing the Find operation on the viewiterator to enter into query mode at the time of launching the form (in pagephaselistener calling managed bean method and the method executes the OperationBinding.execute to execute the find operation). The view does not have any bind variables, It is a simple view on the table with out any mandatory fields. Then I executed "execute" operation using OperationBinding based on an event in the page by entering the query criteria on the page for a textfield. This is working fine and it is returning the matching records for the query criteria. So far it is good.
    http://andrejusb.blogspot.com/2008/09/jdeveloper-11g-crud-in-adf-form.html
    But the problem is when there are mandatory fields. My expectation is to execute the query based on the event in the UI even the mandatory fields are not filled. Let us say If the view object is having 4 mandatory columns and the user enters only 1 column it should perform the query and populate the fields. Could you please sugggest.
    The behavior should be some thing similar to Oracle forms enter query and execute query modes for the same form fields.
    Thanks and Regards,
    S R Prasad

    You're hitting a bug. See ADF Faces Classical Search Form works only with Entity base VO  in JDev 11? for a workaround suggestion.

  • 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,

  • Execute query by name (of query)?

    hi!
    I was reading about weak typed api in lightswitch and I'm wondering can I get and execute query by name?
    so if I have line of code:
    dim coll = me.dataworkspace.applicationdata.Customers.GetQuery.where(function(x) x.name = name).execute
    can it be called with weak type api? like we can do
    dim val = me.details.properties("Name").value  - or something similar..
    and also could this be done with saved queries (like dim coll = CutomerByName(name as string).execute)..
    tnx in advance..
    Kivito
    Nobody expects the Spanish Inquisition! (M.P.F.C.)

    A modeled query can be found under the "methods" object
    So, if you have query named "Query1",
    this.DataWorkspace.ApplicationData.Details.Methods["Query1"]
    You need to use afterward the CreateInvocation method.
    Here is an example from my blog:
    private static IEntityObject GetEntityByKey(IDataService dataService, string entitySetName, params object[] keySegments)
    ICreateQueryMethod singleOrDefaultQuery = dataService.Details.Methods[entitySetName + "_SingleOrDefault"] as ICreateQueryMethod;
    if (singleOrDefaultQuery == null)
    throw new ArgumentException("An EntitySet SingleOfDefault query does not exist for the specified EntitySet.", entitySetName);
    ICreateQueryMethodInvocation singleOrDefaultQueryInvocation = singleOrDefaultQuery.CreateInvocation(keySegments);
    return singleOrDefaultQueryInvocation.Execute() as IEntityObject;
    See: http://blog.pragmaswitch.com/?p=291
    paul van bladel ==independent enterprise application architect== http://blog.pragmaswitch.com

Maybe you are looking for