Query applied in forms

hi
im not sure on how to show my query on the forms that i am using. i am new to oracle form builder 9i. My query is as stated below
CREATE OR REPLACE VIEW OZ AS
select DISTINCT court_id
from booking
where court_id not IN
(select court_id
from booking
where lower (booking_start_time) = lower('&booking_start_time')
and lower (booking_date) = lower('&booking_date')
and lower (court_id) = lower('&court_id')
and lower (booking_status) = lower('&booking_status'));
Im not sure how i would be able to type in the availability fields in the forms that need entering in the fields mentioned in the script above. How would this be done
thanks for reading.

Hi,
i think one chance is to use a stored procedure as Block DataSource.
Create a Package:
create or replace court_disp as
TYPE t_courtrec IS RECORD(
court_id booking.court_id%TYPE
TYPE t_courttab IS TABLE OF t_courtrec
INDEX BY BINARY_INTEGER;
PROCEDURE court_qry(
pt_block_data IN OUT t_courttab
, p_start_time IN varchar2
, p_end_time IN varchar2
, p_court_id IN varchar2
, p_status IN varchar2
in procedure court_qry:
ln_lfd := 1;
for cr in ( select distinct court_id from ... )
loop
pt_block_data( ln_lfd ).court_id := cr.court_id;
ln_lfd := ln_lfd + 1;
end loop;
U can use datablock wizard to assign parameters.
good luck
Robert

Similar Messages

  • Not able insert ,query data from forms

    hi,
    I am not able to insert data or query data from forms(10g devsuite).getting error frm-40505,frm 40508 .i am able to insert and select record from sql plus.the block ihave created is control block .it is connected to the table using the properties.
    should i do anything to insert record.please help

    the block ihave created is control block .it is connected to the table using the properties.A Control Block, by definition, is a non-database block. This means the block is not directly connected to a table so you have to manually display data in the block and any DML you want to perform on data in this block you must do manually as well.
    There are four database objects you can base your database block on; 1) a Table, 2) a View, 3) From Clause Query (basically an In-line View), and 4) a database stored procedure. I recommend you use one of these four methods rather than manually display your data.
    Craig...

  • Different LOVs in af:query and af:form for the same VO attribute

    Hi,
    We need to display different LOVs in af:query and af:form for the same attribute in VO.
    Is it possible to use LOV Switcher for this ?
    What condition can we use in LOV Switcher attribute to check if it is View Critearia row or VO row ?

    We have a VO attribute "User" which needs to be displayed as LOV in a Search Panel ( af:query component created using View Critearia ) and in a af:form.
    When this VO attribute is displayed in search panel, in LOV, we need to show all users.
    When this VO attribute "User" is displayed in a form for editing, in LOV, we need to show only active users.
    For this, we created two LOVs "ActiveUsersLOV" ( which shows only active users ) and "AllUsersLOV" ( which shows all users ) on VO attribute "User".
    LOVSwitcher attribute should return "ActiveUsersLOV" if the LOV is displayed in form and "AllUsersLOV" if the LOV is displayed in search panel.

  • 5200: Error executing query: The data form grid is invalid.

    Hi,
    I am getting this error " 5200: Error executing query: The data form grid is invalid. Verify that all members selected are in Essbase. Check log for details.
    com.hyperion.planning.HspException;hasPovDims=1;povXML=<?xml version="1.0"?><datasources><datasource name="Profit " dsid="228af2c3_129ca3dd85c_-77b1" allowEdit="1"><dim name="Period" dimIndex="1" dsName="Profit " keyDimName="Period" memberName="Apr" displayName="Period: Apr"/><dim name="Year" dimIndex="2" dsName="Profit " keyDimName="Year" memberName="FY10" displayName="Year: FY10"/><dim name="Entity" dimIndex="5" dsName="Profit " keyDimName="Entity" memberName="9999" displayName="Entity: 9999"/></datasource></datasources>"
    I have checked that both the systems essbase and planning are same. nothing's different. still i cannot find the exact reason why the report is not working.
    can any please help me.
    btw, i am using Hyperion Planning 9.3.1
    Thanks,
    BIMS

    Hi
    You probably deleted some members from outline that are used by report
    I would recommend you to open you report/grid via rep.client and try to find which elements are abcent
    Regards
    Alexander
    Edited by: Softperson on 19/8/2010 17:38

  • Frm-40505:ORACLE error: unable to perform query in oracle forms 10g

    Hi,
    I get error frm-40505:ORACLE error: unable to perform query on oracle form in 10g environment, but the same form works properly in 6i.
    Please let me know what do i need to do to correct this problem.
    Regards,
    Priya

    Hi everyone,
    I have block created on view V_LE_USID_1L (which gives the error frm-40505) . We don't need any updation on this block, so the property 'updateallowed' is set to 'NO'.
    To fix this error I modified 'Keymode' property, set it to 'updatable' from 'automatic'. This change solved the problem with frm-40505 but it leads one more problem.
    The datablock v_le_usid_1l allows user to enter the text (i.e. updated the field), when the data is saved, no message is shown. When the data is refreshed on the screen, the change done previously on the block will not be seen (this is because the block updateallowed is set to NO), how do we stop the fields of the block being editable?
    We don't want to go ahead with this solution as, we might find several similar screens nad its diff to modify each one of them individually. When they work properly in 6i, what it doesn't in 10g? does it require any registry setting?
    Regards,
    Priya

  • How to display LOV on web in ENTER-QUERY mode with form or block query only.

    Hello all
    How can I display lov automatic on the web in from enter-query
    mode in form or block query only mode.
    thankx

    If I understand correctly your explanation, your called form
    fails to activate the LOV in enter-query mode when it is deployed
    and test on the browser.
    So lets proceeed like this, to make it work in all environments,
    let us programetically activate the LOV.
    HOW?
    In the called form, write in the WHEN-NEW-ITEM-INSTANCE TRIGGER
    at block level (if have more than one LOV)
    IF :SYSTEM.MODE = 'ENTER-QUERY' THEN
    IF get_item_property(:system.cursor_item,lov_name) IN ('YOUR
    LOV1', 'LOV2' etc) THEN
    IF SHOW_LOV(get_item_property(:system.cursor_item,lov_name))
    THEN
    NULL;
    END IF;
    END IF;
    END IF;
    The above code maybe tweak to suite your need and condition.
    This way, we explicitly make the LOV appear in ENTER-QUERY mode
    whenever the user clicks on an item with an attached LOV.
    Hope this helps.
    Mohammed R.Qurashi

  • Help in Ad-hoc query and Hr form editor

    any body have material links of Ad-hoc query(it means how the reports are generated with Ad-hoc query) and Hr form editor(with examples) plz forward it to me???????????

    Hi,
    HR Ad Hoc Query is the special version of InfoSet Query with the HR object selection.
    You can find the system documentation here:
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/f9/cc9138e4a0341fe10000009b38f8cf/frameset.htm
    However I doubt the use of documentation of the query generator. So what is your concrete question?
    Or in any R/3 via application help of transaction SQ01.
    Also HR580 is a good course.
    Regards,
    Michael

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

  • For Update Query from ORACLE Forms

    Hi
    We are using Oracle Forms 10g running with 10g database 10.2.0.1.0. We happend to see a query which is getting generated in AWR report like Select rowid, all_columns from TableName for Update of C1 Nowait. But no such query is really written in forms and we are aware that, Any query prefixed with rowid is definitely executing from Forms. But how the ForUpdate and Nowait clause is appended to the query.
    We have checked the following properties in the database Block
    *1) Locking Mode is set to Automatic*
    *2) Update Changed Columns only is set to YES*
    *3) Query all records is set to No (Though this particular property may not be relevant to the issue)*
    What is the property or setting which might trigger such a query from ORACLE Forms with ForUpdate and Nowait clause.
    Any ideas/suggestions on why such behaviour. Please have a healthy discussion on this. Thanks in advance.

    you can't dynamically add a query to the data model in reports.
    You should look into the XML based customization of Oracle Reports. This will enable you to define a report dynamically by creating a definition in XML.
    Also another option is to have the report with a query in it and use lexical parameters in reports to pass the query definition or just the where part of it.
    Look at the reports online help for both of these solutions.

  • Can i use case in query in oracle form 6i

    sir can i use case in query in oracle form 6i
    such as
    select empno, case when deptno=10 then dptno end from emp;
    please gice me

    Hello,
    Does this code compile ?
    If not, I'm afraid that the PL/SQL engine of Forms6i does not recognize this syntax.
    Francois

  • How to check the source query of tabular form ....

    Hi All ,
    is there any way to change the source query of tabular form ......
    ya ... i could see it in the source but it is normal sql query ....
    where as to generate the addrow functionality the sql query must be
    Select empno , ADD_ITEM.TEXT(1,empno), ename ,ADD_ITEM.TEXT(2,ename)................
    then where can i find this query .?
    i could see that ADD button is calling ADDROW process and which inreturn calling ADD function ....
    can any one tell me , where to see the code for this ADD function ....
    as i checked it in db ..... it is not there at all.

    You can have a look here for the manual tabular forms:
    http://apex.oracle.com/pls/otn/f?p=31517:170
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494
    -------------------------------------------------------------------

  • [OIM] - Form Complex Lookup Query on child form

    Hi all expert
    I have two form, which is parent-child relationship.
    I need to form a lookup query on child form's lookupfield to let user select the value but lookup query depens on the parent form on what user selecting..
    Example as:
    Parent form - Country Code - 100
    Child Form - Department Code - Lookup query will be = Select DepartmentCode From DeparmentLookup where country ="100"
    The "100" value depends on what user choice on CountryCode fro mparent form.
    Can i do something like this ?
    Thank in advanced
    John

    This happen for a property setting in the relation. try this..
    Select all your relation in the form under Relation nodes (data block >> relation)
    go to property or press F4 and set the following property to YES
    Prevent Masterless Operations = Yescompile and check..
    Hope this will works.. ;)
    Hamid
    Mark correct/helpful to help others to get right answer(s).*

  • Restricting query\where in forms 6i

    Hi,
    Is it possible to restrict the users from using Query\Where in forms 6i
    Thanks in advance.

    Hi Manu,
    We can open Query\Where dialog in enter query mode , if we are entering ':' in a field and pressing the execute query button.
    But I do not want the user to us this feature of Forms,is there any ways to do it.
    I know that it can be done in Oracle forms 10g, but I need to know whether it can be done in Forms 6i
    Thanks for your response

  • Query Only Mode Forms.

    This is my last port of call...
    Is there a SYSTEM variable or Form/Application property I can check to see if my form has been called with the query_only option set (from NEW_FORM and CALL_FORM).
    I can't find anything and if not, I'm going to have to use a global variable or a parameter.

    I'm still having problems here.
    If my code decides that the form should be called with no_query_only, but it's called from a form that has been called with query_only, the new form is called query_only.
    Things get even more confused on the way back out of the stack as at some point the access switches back from query_only to no_query_only, but my global variable still show query only!
    Forms knows that the it's in query only mode, why Isn't there a property to tell the developer?

  • Query button in forms/portlet

    What is the rules of the automatic Query button in forms displayed as portlet in a page. Sometimes it works and sometimes not.
    Thank's in advance.

    I've found the problem. I have in my form my primary key as a hidden field with a default value generated by a sequence.nextval. What I don't now is that the default value is generated in the form show. So I always have a hidden criteria with a new primary key which never exist and block my query.
    I will generate my primary key id sequence with a trigger before insert in the database, not in the form.

Maybe you are looking for

  • Konica Minolta Magicolor 2530DL Laser no longer working with 10.4.10

    Hey all. I have a Minolta 2530DL laser printer that I previously had up and running via my network, using 10.4.9 and it worked fine. But ever since I updated to 10.4.10, the printer is no longer seen by my Mac. I installed the driver found here: http

  • Creation of a PDF hangs no matter from where it is started

    Hi,  we use Adobe Acrobat 9 (v9.55) and one of our collegues has a weird problem. When he tries to create a PDF from Word over the Adobe PDF Plugin he gets asked twice for the place to save the PDF and after that the conversion hangs at about 10%. We

  • Internet Explorer 11 not opening iframes after KB3032359 update

    Basically: Internet Explorer 11 not opening iframes(src is same program folder) after KB3032359 update. (Chrome or Firefox opens all iframes) We have web solution on Windows 2008 .NET 4 version, wroten C# (Visual Studio 10). Program has left side men

  • Help with iTunes Library and External Music Management

    Okay, this nightmare has been getting worse and worse over the past few weeks so let's break it down so people can understand what I'm trying to do. 1) I have music on both my internal laptop drive and external drives. 2) I want to have two libraries

  • New SSD

    Hallo, i got a New SSD from Lenovo, behause my Old One was broken. The X230t is not able to boot from this SSD!? Is this Common, that no operating System is preconfigured? I Wonder if I have to use the recovery CDs to install Windows on the New SSD,