Number of the Apex 4.2.4 Xe field

Hello together,

I am facing the following problem:

I created a page and added a 'number' field in a mobile application.

But what the user can enter characters. If he wants to save, he gets the message "only numeric values are allowed.

So my questions are as follows:

1. How can I avoid that the user is able to enter characters. Only, it should be possible to enter numeric values.

2. is there a solution to display only the pavement when he puts his cursor to a deposited number?

Thanks in advance.

Joe

Hello

I found a solution for these two issues.

1. do not allow than numbers in a field 'number '.

As already described by TexasApexDeveloper, to use javascript. I changed its function a bit:

function isNumber (event) {}

If {(event)

charCode = (event.which) var? Event.which: event.keyCode;

If (event.altKey / / alt)

|| event.ctrlKey / / Ctrl

|| event.shiftKey / / shift

|| Event.which = 0 / / special characters

|| ! ((charCode > = 48 && charCode))<= 57)="">

|| (charCode > = 96 & charCode)<= 105)="">

|| (charCode > = 37 & charCode)<= 40)="">

|| charCode = 8 / / go back

|| charCode = 46)) {/ / delete}

Returns false;

}

}

Returns true;

};

To call the function, open the requested item and add the following line in the section 'The HTML Form element attributes': onkeydown = "return isNumber (event);" onkeyup = "return isNumber (event);"

2. don't show that the numeric keypad

There are two solutions:

(a) create a plug-in or

(b) use an existing: http://www.apex-plugin.com/oracle-apex-plugins/item-plugin/html5-input-item_107.html

Note: This is not my plugin and not my web side. Please read all the terms and agreements of this side of the web.

concerning

Joe

Tags: Database

Similar Questions

  • Number of the page to start from another field

    Hi all

    I have a RTF model that shows a few bills. I have the invoice number and the page number that appear correctly. So if my report back 5 invoices I want for each bill page from 1 number. Currently, he does not like that.

    Now as a result:

    Invoice: has

    Page NUM:1

    Line: 1

    Invoice: has

    Page number: 2

    Line 2

    Invoice: B

    Page NUM:3

    Line 1

    Can begin it of Bill B by Page number 1 instead of 3?

    Kind regards

    Stoyanov

    Thank you for using for-each@section:G_INVOICE, instead of just for each.

    This will reset the page numbers for each invoice.

    Replace G_INVOICE with your actual bill group name.

  • The number of characters in the CLOB column is supported by the report of the APEX

    Hello

    Actually, I have a report of the Apex based on CLOB column, which includes data whose length exceeds 10,000 characters.

    up to 10,000 characters, it works fine, but once it get records with characters more than 10 + lift

    ORA-06502: PL/SQL: digital or value error: character string buffer too small

    Thank you and best regards,

    Ashish

    2902196 wrote:

    Please update your forum profile with a recognizable username instead of "2902196": Video tutorial how to change username available

    Always include the information referred to in these guidelines when you post a question: How to get the answers from the forum

    Actually, I have a report of the Apex based on CLOB column, which includes data whose length exceeds 10,000 characters.

    up to 10,000 characters, it works fine, but once it get records with characters more than 10 + lift

    ORA-06502: PL/SQL: digital or value error: character string buffer too small

    The maximum size of a column report CLOB value is 32 KB. However, the maximum size for the content of the line of the full report is also 32 KB (including the HTML markup), so you can be hitting this limit because of the size of your 10 K CLOB data + the rest of the line.

    According to the database character set and the characters which that contains data, the character encoding may use more than one byte to represent a character.

  • ORA-01465 number hexadecimal invalid on an update of the Apex form

    Hello

    I get the above error when everything I do is adding data of normal text to a form that is to include a file upload, but the error does not occur when I download a file.  It happens when I add data to a text box in which is of type varchar2, not when I download a file.  It is in the Apex 4.2.4

    error2.gif

    If I just enter a text string, the data are updated without error, but the text box is varchar2 (4000) so I don't understand why I get this error.  Below is the data entry is successful - no error message, the data is refreshed.

    .no_error.gif

    Help on what to look at to find the cause of this error would be appreciated.

    Pat

    Hello

    My report and the form was built using Apex tool wizards.  By the process of elimination, I realized that the error came from the "Show only" field I had put on the form for one of the file download I don't want the user to change.  So I rebuilt the form/report, so the interactive report shows just the displayable downloads (downloaded previously) by other users and the form only shows the appropriate field to download new files.  I have no more errors.

    Thanks to all for the replies!

    Pat

  • Apex_ir.get_report acting strange in the apex 5

    Hello world


    According to the guidelines of this thread, I've implemented the service recommended to manage the requirement.

    Dynamic action for "no filter selected" on IR

    This works well in the apex 4.2

    In 5 Apex, I get an error: ORA-06502: PL/SQL: digital error or value

    I spent hours trying to understand what is happening and the strange thing is that the function returns the correct value (as a number). When I remove the call to the function of my sql IR base then it starts to work, of course, does not have the functionality I'm looking for.

    Any ideas? I'm on 5.0.0.00.31

    Thank you!

    Hello

    had a look at the code of apex_ir.get_report, and due to some code changes necessary it will never work inside the international registration data source more. But I played a little and it seems that the following code does exactly what you want. But no guarantee that it works also in a future version of the APEX.

    create or replace function get_filter_count(p_application_id in NUMBER, p_page_id in NUMBER)
    return NUMBER
    AS
        l_region_id number;
        l_report_id number;
        l_count     number;
    BEGIN 
    
        select region_id into l_region_id
        from apex_application_page_regions
        where application_id = p_application_id
        and page_id = p_page_id
        and source_type = 'Interactive Report';
    
        l_report_id := apex_ir.get_last_viewed_report_id (
                           p_page_id   => p_page_id,
                           p_region_id => l_region_id );
    
        select count(*)
          into l_count
          from APEX_APPLICATION_PAGE_IR_RPT r,
               APEX_APPLICATION_PAGE_IR_COND f
         where r.base_report_id = l_report_id
           and r.session_id     = apex_application.g_instance
           and f.report_id      = r.report_id
           and f.condition_type in ( 'Search', 'Filter' );
    
        return l_count;
    END get_filter_count;
    

    Concerning

    Patrick

  • Data Guard and auditor of the Apex

    Hi all

    I seem to be unable to understand the configuration of parameters for protective Apex listener when connecting to a database.

    We have a lot of servers of databases (without data guard) and we use the command line Wizard to generate the configuration file. It's straigthforeward and
    easy. We enter the server, port, and Service_name and it works.

    But for a guard database, there are two servers and I seem to be unable to set it in the right way. After doing some research I came across the parameter apex.db.customURL which should solve the problem.

    I removed the references to the server, port, and Service_name and put the key in.

    The result were errors of connection due to some incorrect port settings.

    SEVERE: The pool named: apex is not properly configured, error: IO error: format invalid number for the port number

    oracle.dbtools.common.jdbc.ConnectionPoolException: the pool named: apex is not properly configured, error: IO error: format invalid number for the port number

    at oracle.dbtools.common.jdbc.ConnectionPoolException.badConfiguration(ConnectionPoolException.java:65)

    What Miss me?

    Thank you
    Michael

    (Here's the rest of our configuration :)

    <? XML version = "1.0" encoding = "UTF-8" standalone = 'no '? >

    < ! DOCTYPE SYSTEM property "http://java.sun.com/dtd/properties.dtd" > ""

    Properties of <>

    < comment > saved on Mon Oct 19 18:28:41 CEST 2015 < / comment >

    < key "debug.printDebugToScreen entry" = > false < / entry >

    < key "security.disableDefaultExclusionList entry" = > false < / entry >

    < key = "db.password entry" > @055EA3CC68C35F70CF34A203A8EE1A55D411997069F6AE9053B3D1F0B951D84E0E < / entry >

    < key = "enter cache.maxEntries" > 500 < / entry >

    < key = "enter error.maxEntries" > 50 < / entry >

    < key = "enter security.maxEntries" > 2000 < / entry >

    < key = "cache.directory entry" > / tmp/apex/cache < / entry >

    < enter key = "jdbc. DriverType"> thin < / entry >

    < key = "enter log.maxEntries" > 50 < / entry >

    < enter key = "jdbc. MaxConnectionReuseCount"> 1000 < / entry >

    < key "log.logging entry" = > false < / entry >

    < enter key = "jdbc. InitialLimit' > 3 < / entry >

    < enter key = "jdbc. MaxLimit' 10 > < / entry >

    < key = "enter cache.monitorInterval" 60 > < / entry >

    < key = "enter cache.expiration" > 7 < / entry >

    < key = "enter jdbc.statementTimeout" > 900 < / entry >

    < enter key = "jdbc. MaxStatementsLimit' 10 > < / entry >

    < key = "misc.defaultPage entry" > apex < / entry >

    < key = "misc.compress" / entry >

    < enter key = "jdbc. MinLimit"> 1 < / entry >

    < key = "cache.type entry" > lru < / entry >

    < key "cache.caching entry" = > false < / entry >

    < key "error.keepErrorMessages entry" = > true < / entry >

    < key = "cache.procedureNameList" / entry >

    < key = "cache.duration entry" > days < / entry >

    < enter key = "jdbc. InactivityTimeout"1800 > < / entry >

    < key "debug.debugger entry" = > false < / entry >

    < key = "enter db.customURL" > JDBC: thin: @(DESCRIPTION = (ADDRESS_LIST = (ADRESSE = (COMMUNAUTÉ = tcp.world) (PROTOCOL = TCP) (host = DB-ENDUR) (Port = 1520)) (ADDRESS = (COMMUNITY = tcp.world)(PROTOCOL=TCP) (Host = DB-ENDURK) (PORT = 1521)) (LOAD_BALANCE = off)(FAILOVER=on)) (CONNECT_DATA = (SERVICE_NAME = ENDUR_PROD.) VERBUND.CO. «"" AT))) < / entry >»»»

    < / properties >



    Hi Michael Weinberger,

    Michael Weinberger wrote:

    I seem to be unable to understand the configuration of parameters for protective Apex listener when connecting to a database.

    We have a lot of servers of databases (without data guard) and we use the command line Wizard to generate the configuration file. It's straigthforeward and
    easy. We enter the server, port, and Service_name and it works.

    But for a guard database, there are two servers and I seem to be unable to set it in the right way. After doing some research I came across the parameter apex.db.customURL which should solve the problem.

    I removed the references to the server, port, and Service_name and put the key in.

    Keep the references the server name, port and service. No need to delete.

    The result were errors of connection due to some incorrect port settings.

    SEVERE: The pool named: apex is not properly configured, error: IO error: format invalid number for the port number

    oracle.dbtools.common.jdbc.ConnectionPoolException: the pool named: apex is not properly configured, error: IO error: format invalid number for the port number

    at oracle.dbtools.common.jdbc.ConnectionPoolException.badConfiguration(ConnectionPoolException.java:65)

    What Miss me?

    You must create two entries in the configuration file "defaults.xml" for your ADR (formerly APEX Listener).

    One for db.connectionType and, secondly, for db.customURL, for example:

    customurl
    jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=
    (ADDRESS=(COMMUNITY=tcp.world)(PROTOCOL=TCP)(HOST=DB-ENDUR)(Port = 1520))
    (ADDRESS=(COMMUNITY=tcp.world)(PROTOCOL=TCP)(HOST=DB-ENDURK)(PORT = 1521))
    (LOAD_BALANCE=off)(FAILOVER=on))(CONNECT_DATA=(SERVICE_NAME=ENDUR_PROD.VERBUND.CO.AT)))
    

    Reference: http://docs.oracle.com/cd/E56351_01/doc.30/e56293/config_file.htm#AELIG7204

    NOTE: After you change the configuration file, don't forget to restart independent ADR / Java EE application server support if ADR is deployed on one.

    Also check if your URL for a JDBC connection is working properly and if there are any questions, you can turn on debugging for ADR:

    Reference:

    Directed by Tony, you should post the ADR related questions to the appropriate forum. Reference: ADR, SODA & JSON in the database

    You can also move this thread on the forum of the ADR.

    Kind regards

    Kiran

  • Need help using the tabs of the apex to the universal theme.

    I tried using the enkitec boards to create tabs in page apex.

    But I'm unsucessfull and I used the apex as the version 5.

    The theme that I use is universal theme.

    https://www.enkitec.com/Apex/f?p=15300:30310:0:

    Also I'm tired the method too to create tabs below

    Creation of a region of the tab within a page in the APEX

    It's like

    In the HTML header, I'll add the code below

    <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/themes/redmond/jquery-ui.css" type="text/css" /> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.js"> </script> <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.js"> </script> <script type="text/javascript"> $(function() {    $("#tabs").tabs();    $x("tabs").appendChild( $x("tabs-1"));    $x("tabs").appendChild( $x("tabs-2")); }); </script>

    Then I'll create 3 region.

    Region 1 > > > create a HTML region (REGION MODEL = MODEL number) and add the code below in the SOURCE of the REGION

    <div id="tabs"> <ul>    <li><a href="#tabs-1">Employee</a></li>    <li><a href="#tabs-2">Chart</a></li> </ul> </div>

    Region 2 > > > create HTML region... Add two fields to the region now, edit the region

    Add the code below in the header of the region to REGION 2

    <div id="tabs-1">

    Add the code below in the bottom of the region to REGION 2

    </div>

    Region 3 > > > create HTML region... Add two fields to the region now, edit the region

    Add the code below in the header of the REGION 3 region

    <div id="tabs-2">

    Add the code below in the bottom of the REGION 3 region

    </div>

    Example: http://Apex.Oracle.com/pls/Apex/f?p=12060:7

    I used exactly the same code... except that my region 2 contains a REPORT instead of two text field and region 3 GRAPHICS instead of text field.

    Kind regards

    Shijesh

    -------

    Please reward the answer if it was useful / correct


    I used the enkitecs method to create tabs.

    Tabs have been created, but the fields were visible inside.

    Will soon be replicating the scenario of apex.oracle.com

    Maybe someone can help.

    At the same time if there is no easy way to create tabs in apex page please let me know.

    Thank you

    Paul

    Hi pauljohny100,

    pauljohny100 wrote:

    I'd like to learn more about the region view selector

    You have a good resource on it.

    Selector display region is type of region, which shows the navigation links in the form of hyperlinks button for regions where the attributes of the region-> region selector display are set to Yes. Œuvres similar to jQuery tabs.

    Reference: ApEx 4.0 region selector | iAdvise blog (it's blog when it was introduced first in APEX 4.0)

    I have not found any Oracle Documentation on this, but it's taken APEX oracle supported the region type.

    You will find that this implemented in various packaged for example P-Track applications.

    Kind regards

    Kiran

  • Paste does not work on the Apex smartphone app

    Hello

    I tried to use a barcode scanning app to paste into a field on an application to sensitive design (theme Apex 4.2.4 25) being seen on a smartphone (iphone 5 c), but I can't paste it to work - tried browsers Safari and Chrome.  I checked the dough works on my gmail on the iphone: I pasted successfully it then it has sent to myself, then went to my office, copied from the email and pasted in the desktop version of the same application and that worked.  However, it would be nice to have it working on the smartphone, because the goal of making this reagent should allow someone on the ground with an ipad or iphone to scan the bar code and paste it into the appropriate field in the application.

    Why is the Apex application not able to take a dough similar to the dough accepted by my gmail on the same phone app?  What Miss me?

    Thank you

    Pat

    Pat,

    According to my experience, the theme, and blue reactive office - 25 is suitable for different screen sizes, but was not necessarily intended to be used on iPhones and other.

    The BONE grows quite well how the interface will work.  An item number presented at an office of the OS will allow you to select a number via a up/down control.  The same page that an iPhone will present the number pad and allow the entry of a number any.  So in this case, the same application is is has differently based on the device or the operating system accesses the page.

    Jeff

  • Tips and advice from Expert in the APEX

    Hello Expert,

    I have a question, I was asked to look at a few applications that were built with Oracle Portal, lots of procedures for Oracle that will generate the html. Oracle does not support Oracle Portal and my organization is trying to use the following procedures to create the same type of Application Oracle apex. I have no idea on the Oracle Portal but, I can understand the instructions of orders which will result in the p/sql in HTML a bit.

    My question for those who have already worked on Oracle Portal, is adviceble to reuse these procedure and generate forms and html in APEX as Oracle APEX generate heaps of HTML as well.

    Someone at - it had the same problem when they did move to Oracle Portal, Oracle apex? How do they proceed? What was the results? Anyone can lead me to a site or a blog for more information on how to treat and to conduct this type of conversion?

    feel free to send me an e-mail to [email protected]

    Hello

    Years ago, I worked with Oracle Portal for a client who wanted a number of paper translated forms online forms. We did it creating PL/SQL procedures that generated HTML forms (and with javascript) - and the link to launch the PL/SQL procedure was published on the portal page.

    To develop these forms and manage transactions in the database has been VERY heavy.

    APEX is a great framework that allows you to declaratively set all parts of the form. There is also much more features and capabilities of formatting, validations, etc. session state.

    I think you will find that the effort required to create a PL/SQL procedure that generates an HTML form can quickly and easily be created in a few minutes in the wizards of the APEX.

    I'd say it's best to re-create each of your forms using the framework of APEX, you will find many more features. This should be pretty easy to do a proof of Concept, if you already have your database of the portal database table definitions.

    Have you had a glance at some of the samples form on apex.oracle.com?

    Amanda.

  • How to change the border style of the list items in the apex


    Hi all

    We have created a few items from the selection list in the Apex and ask users to make changes to the border.

    I tried many ways, but he was not able to make changes, some could help me how we can change the border style of list items in Apex. By, the approach has been used by us

    Attributes of the element in the HTML form -> style = "" border: 1px solid #E5E4E2; "" [I speak that way] but no luck.

    Kind regards

    Sheikh tayeb.

    SruthiTamiri wrote:

    Hello

    Please find the details below

    APEX version # 3.2

    Internet Explorer version #7

    Mozilla version 12.0.

    Used theme #Blue

    Topic identification number is #12

    It is not possible to change the appearance of the borders of the selection list in IE7.

    To the borders of all the elements of the selection list style on a page in other browsers, include the following style sheet in the HTML Header page:

    .formlayout select {
      border: 1px solid #E5E4E2;
    }
    

    APEX 3.2 is no longer supported, and IE7 is obsolete. Upgrade to the current version is recommended.

  • How to enable and disable a field dependent on another field in the Apex.

    Hello

    I'm new to Apex. IM using Apex Version 4.2.

    I have a tab named CREDITS he has 10 fields. Among them is PROJECT NUMBER, AUTHORIZAION DATE (CALENDAR TYPE POPUP), and FUNDS FLAG CHECK.

    NUMBER of THE PROJECT , the fields are filled, including the FUNDS VERIFIER FLAG is based on the scenario.

    But the AUTHORIZAION DATE is a REQUIRED field must be filled in by the user

    The requirement is to make DATE AUTHORIZAION as MANDATORY when the FUND CHECK FLAG is * "VIRGIN" * or * 'Y' * ' "

    If the FUND CHECK FLAG is * "N" * then the DATE AUTHORIZAION to bring in OPTION.

    Any help will be greatly appreciated...


    Thank you
    Vishal

    You will not be able to get the answers here, post your question in the appropriate section after mark this thread as answered

    "Oracle Discussion forums" Oracle Database "Application Express

  • Telephone number through the Plugin entry hidden

    I'm new to Apex and know almost nothing about jQuery. I just downloaded and linked to the latest version of jQuery, 1.9.1 and also downloaded and linked to the file from js to the plugin entry hidden Josh Bush. I'm trying to link a text box on a page with a phone number input mask, that works great in the demo from Josh. It is not a demo of the Apex and not very informative on how to include the code on my Apex page. Here's what I have the front header at the moment:

    Can someone tell me is this is correct, if not, what should I change and then how to bind to my text box.

    Thank you!

    < script src = "" #WORKSPACE_IMAGES #jquery - 1.9.1.js "type =" text/javascript">"
    < /script >

    < script src = "" #WORKSPACE_IMAGES #jquery_maskedinput.js "type =" text/javascript"> < / script >"


    < script >

    $(document) .ready (function () {}

    {jQuery (function ($)}
    $("#date").mask("99/99/9999");
    $("#phone").mask ("(999) 999-9999");
    $("#tin").mask("99-9999999");
    $("#ssn").mask("999-99-9999") ;}) ;

    });

    < /script >

    Or the 'hidden text' plugin to http://www.oracle.com/technetwork/developer-tools/apex/application-express/apex-plug-ins-182042.html#item

    Concerning
    Patrick
    -----------
    Member of the APEX development team
    My Blog: http://www.inside-oracle-apex.com
    APEX Plug-Ins: http://apex.oracle.com/plugins
    Twitter: http://www.twitter.com/patrickwolf

  • Oracle form functions and procedures in the APEX, how?

    I'm working to recreate in the APEX, already existing read only forms in Oracle Forms. Report features interactive APEX among other things, in fact worth as well as to target a different audience than utilizies versions of Oracle Form. Versions of Oracle Forms use a lot of pre and post query triggers, PLSQL functions.

    In Oracle Forms that places, these functions can be found in the "Units of program" section of the form. A feature typical of this kind, based on a particular Mission ID route, collecting names of regular passengers, is shaped with a comma and a space after each of them, in a single string that is returned and displayed the list of passengers of a line.

    I have all of this written code so I can move most of the main request of the Oracle form in an interactive report. These functions and triggers called in the form of the "Units of program" section of the Oracle form rather than stored in the database schema in a package, where they would go inside the APEX? Can I create a 'shortcut' in the APEX and call it from the interactive report "Source Région"? I can create the PLSQL function at the level of the region of the interactive report or page level? Or, my best bet creates a package that is stored in the database, all these functions and/or proecedures I might need the original form of Oracle?

    Some advice would be greatly appreciated.

    RLBickham wrote:
    I don't think I've been pretty clear in the description of the specific thing I want to do, simply, it does not reach the level of forms of conversion of the APEX. It is basically a problem of PLSQL function.

    I have an interactive report which is currently 90 percent of what I want however, each line, which represents a Mission may have several feet. Each arm has two places or ICAO codes attached to it. Based on the number of Mission, I want to loop through the array of leg, collect all the codes of ICAO for this Mission, put them together in 1 variable separated by a coma and add this variable to display the columns in this interactive report as the last column.

    In Oracle Forms, I have a function registered in the database, which is called in the main query. Maybe I ask a question that does not need to be asked, but anyway my question is can I put this function currently in the database somewhere within the interactive report and somehow reference it via Http, or should I just stick with set of functions and procedures in the packages stored in the database and called the conventional way?

    You could switch the function to the database and call it from the report query, but it sounds as if it were superfluous. In the report query using any form of Re: 4. How can I convert rows to columns? is appropriate for your version of the (unspecified) database.

    -----

    When you have a problem, you will get an answer faster, more efficient including information as much information as possible from the outset. This should include:

  • Full version of APEX
  • Complete operating system DB, version, edition, host
  • Architecture of Web server (EPG, SST or APEX listener/host operating system)
  • Browser (s) and version (s) used
  • Theme
  • Model (s)

  • Region/section type (s) (particularly as to distinguish if a 'report' is a standard report, an interactive report, or indeed a 'update report' (i.e. a tabular presentation))

    With APEX, we also had the chance to have a great resource in apex.oracle.com where we can reproduce and share problems. Reproduce things is the best way to solve most of the questions, particularly those relating to the layout and Visual formatting. If you expect a detailed response it is appropriate that you take on an important part of the effort by getting as much as possible with an example of the problem on apex.oracle.com before asking for help on specific issues, then we can see firsthand.

  • How do the query select outer join to a report of the APEX

    Hi all

    I'm Ann.

    I have a select statement that is used to calculate statistics for a month (October 2012 in this example)
    Select ph.phase_number
    sum ((case
    WHEN ph.date_finished IS NULL or ph.date_finished > last_day (TO_DATE (' ' Oct 2012 ', ' MY YYYY' "))
    THEN last_day (TO_DATE (' ' Oct 2012 ', ' MY YYYY' "))
    Of OTHER ph.date_finished
    END)
    (-ph.date_started + 1) / count (def.def_id) as avg_days
    Ph phase_membership
    inner join court_engagement this on ph.mpm_eng_id = ce.engagement_id
    join in-house defendant def on ce.defendant_id = def.def_id
    where def.active = 1
    and ph.date_started < = last_day (TO_DATE (' ' Oct 2012 ', ' MY YYYY' "))
    and ph.active = 1
    and UPPER (ce.court_name) LIKE '% '.
    Rollup Group (phase_number)
    ;

    The result is as below
    Phase_Number AVG_DAYS
    Phase One 8.6666666666666667
    Phase two 14.6
    Phase three 12
    11.4615365

    I have another list of selection mainly the list of months between two date value.
    Select to_char (which_month, 'LUN YYYY') as display_month
    de)
    Select add_months (to_date (' ' August 2012 ', ' MY YYYY' "), rownum-1) which_month
    of object
    where
    rownum < = months_between (to_date (' ' Oct 2012 ', ' MY YYYY' "), add_months (to_date (' ' August 2012", "MY YYYY"), - 1))
    order of which_month)

    The query result is as below

    DISPLAY_MONTH

    AUGUST 2012
    SEP 2012
    OCT 2012

    Is it possible I can join these two select statement above to generate a comparable result:

    Days of month Phase number Avg
    August 2012 Phase One 8.666
    Sep 2012 Phase One 7.66
    Oct 2012 Phase One 5,66
    August 2012 Phase two 8.666
    Sep 2012 Phase two 7.66
    Oct 2012 Phase two 5,66
    August 2012 Phase three 8.666
    Sep 2012 Phase three 7.66
    Oct 2012 Phase three 5,66

    Or
    Days of month Phase number Avg
    August 2012 Phase One 8.666
    August 2012 Phase two 7.66
    August 2012 Phase three 5,66
    Sep 2012 Phase One 8.666
    Sep 2012 Phase two 7.66
    Sep 2012 Phase three 5,66
    Oct 2012 Phase One 8.666
    Oct 2012 Phase two 7.66
    Oct 2012 Phase three 5,66

    And it can be controlled by Phase number or month.
    My other colleague suggested I should use a left outer join, but after having tried many ways, I'm still stuck.

    I tried select is
    Select a.display_month, b.* in)
    Select to_char (which_month, 'LUN YYYY') as display_month
    de)
    Select add_months (to_date (' ' August 2012 ', ' MY YYYY' "), rownum-1) which_month
    of object
    where
    rownum < = months_between (to_date (' ' Oct 2012 ', ' MY YYYY' "), add_months (to_date (' ' August 2012", "MY YYYY"), - 1))
    order which_month)) a left outer join

    (Select to_char (ph.date_finished, 'MY YYYY') as join_month, ph.phase_number)
    sum ((case
    WHEN ph.date_finished IS NULL or ph.date_finished > last_day (TO_DATE (a.display_month, 'MY YYYY'))
    THEN last_day (TO_DATE (a.display_month, 'MY YYYY'))
    Of OTHER ph.date_finished
    END)
    (-ph.date_started + 1) / count (def.def_id) as avg_days
    Ph phase_membership
    inner join court_engagement this on ph.mpm_eng_id = ce.engagement_id
    join in-house defendant def on ce.defendant_id = def.def_id
    where def.active = 1
    and ph.date_started < = last_day (TO_DATE (a.display_month, 'MY YYYY'))
    and ph.active = 1
    and UPPER (ce.court_name) LIKE '% '.
    To_char (ph.date_finished, 'MY YYYY'), group (phase_number) rollup) b
    On a.display_month = b.join_month

    but then I get an error
    SQL error: ORA-00904: "A." "" DISPLAY_MONTH ": invalid identifier

    I need to view a report on the APEX with option for people to download at least format CSV.
    Already 1 inteactive report in the page, so I don't think adds another interactive report without using the iframe trick.

    If any of you have any ideas, please help.

    Thank you very much.

    Ann

    Hello Ann,.

    Frank has done a very good job. I am also impressed.

    Is in regard to your correction to his question, the problem is on this replacement you did

    last_day(TO_DATE(am.which_month,'MON YYYY'))
    

    AM.which_month is already a date type, and you don't need to convert it to this day.
    Here is the correct way:

    last_day(am.which_month)
    

    There are also sometimes with the data you've posted have no line for this month. So I also added a function NVL to display 0 under avg_days for these cases.

    Here is my corrected query:

    DEFINE startmonth = "Aug 2012";
    DEFINE endmonth   = "Oct 2012";
    WITH  all_months  AS
    (
       SELECT ADD_MONTHS(to_date('&startmonth','MON YYYY'), ROWNUM-1) AS which_month
       ,      ADD_MONTHS(to_date('&startmonth','MON YYYY'), ROWNUM  ) AS next_month
       from all_objects
       where
       rownum <= months_between(to_date('&endmonth','MON YYYY'), add_months(to_date('&startmonth','MON YYYY'), -1))
    )
    SELECT TO_CHAR (am.which_month, 'Mon YYYY')  AS month
         , ph.phase_number
         , NVL(sum ( (CASE
                     WHEN ph.date_finished IS NULL OR ph.date_finished > last_day(am.which_month)
                     THEN last_day(am.which_month)
                     ELSE ph.date_finished
                  END
                 ) - ph.date_started + 1
               ) / count(def.def_id), 0) as avg_days
      FROM all_months am
           LEFT OUTER JOIN  a_phase_membership  ph  PARTITION BY (ph.phase_number)
              ON  am.which_month <= ph.date_started
              AND am.next_month  >  ph.date_started
              AND ph.date_started <= last_day(am.which_month)  -- May not be needed
              AND ph.active = 1
           LEFT OUTER JOIN  a_engagement  ce
              ON  ph.mpm_eng_id = ce.engagement_id
              AND ce.court_name IS NOT NULL  -- or something involving LIKE
           LEFT OUTER join  a_defendant     def
              ON  ce.defendant_id = def.def_id
              AND def.active = 1
     GROUP BY ROLLUP(phase_number, am.which_month)
     ORDER BY  am.which_month
            ,  ph.phase_number
    ;
    
    The output is:
    MONTH    PHASE_NUMBER           AVG_DAYS
    -------- -------------------- ----------
    Aug 2012 PHASE ONE                     0
    Aug 2012 PHASE THREE                   0
    Aug 2012 PHASE TWO                     0
    Sep 2012 PHASE ONE                    12
    Sep 2012 PHASE THREE                   1
    Sep 2012 PHASE TWO                     9
    Oct 2012 PHASE ONE                     8
    Oct 2012 PHASE THREE                   0
    Oct 2012 PHASE TWO                    14
             PHASE ONE                    11
             PHASE THREE                   1
             PHASE TWO                  11.5
                                  9.71428571
    

    I don't know if that's really what you want. In the case check it and let me know.

    Kind regards.
    Al

  • Attachments to the APEX

    Hi all

    I would like to know please, if there is a possibility to store a file in APEX as attachments. In my application, the client should have an option to add a file from the local hard disk when you fill out a form. The file must be stored and can be opened by any user of the application at any time.

    So my questions are:
    1. is described above in the APEX as possible? I think that it is.
    2. is there a file size limit?
    3. is there a limit to file extension? (xls, pdf,...)

    Thank you very much in advance for your answer.

    Best regards

    Vladimir

    PS: in the sample Application (e-shop) is possible to upload a photo of a product. I need to download a spread sheets or a PDF document.

    Vladimir Bartos says:

    I would like to know please, if there is a possibility to store a file in APEX as attachments. In my application, the client should have an option to add a file from the local hard disk when you fill out a form. The file must be stored and can be opened by any user of the application at any time.

    Assuming that the APEX 4.x (you must always specify your APEX version), see support of BLOB in forms and reports.

    There is a tutorial OBE which followed the introduction of the declarative BLOB support in 3.1 as well. (An earlier version, but it is still relevant for APEX 4.x.)

    So my questions are:
    1. is described above in the APEX as possible? I think that it is.

    Yes, using BLOB support described above.

    2. is there a file size limit?

    For individual files for all practices, no. (if your database is Oracle XE and you have a lot of files, then the number of files you can store is limited).

    3. is there a limit to file extension? (xls, pdf,...)

    Once again, for most practical applications using common files such as Excel and PDF, not types.

Maybe you are looking for

  • Only a limited number of visible to download Facebook pictures

    Hello Stupid, but problem driving me crazy, I have a new macbook air with hundreds of photos, when I want to upload a photo on facebook or join an e-mail only photos taken since 15 December are visible to tie. I have to export old photos on the deskt

  • client PC is not accessible

    Hello our Manager uses Quick-books. His Deputy has to connect to his computer so that they can work together. However, his Assistant cannot connect to Quick books to host computer. When I look at network settings, it gives an error that the pc is not

  • Question from windows vista - get stuck on the Welcome screen.

    I recently had my computer startup problems - it gets stuck on the home page, even if I restart it continues.  If I'm doing a ctrl + alt + delete, and then it displays the desktop.  I have no updates that must be accomplished.  you have an idea why t

  • Unable to uninstall a program from my PC

    I have Windows 7, 64 bit on my computer.  A program called bear hand suddenly appeared on my computer.  I tried to uninstall it and I get a message asking me why I want to uninstall.  I indicated that I did not want it and still cannot uninstall it. 

  • Adaptive Wide Angle - control of the tools of coercion

    Hey friends,Having a few frustrating problems with this very powerful tool.I'm stitching a panorama made with pictures taken on a 35 mm lens and using the Adaptive Filter large right angle curved lines.Using the constraint from the outset tool does n