Error when create new apex_collection

Hello world

I'm trying to create a process as below

() apex_collection.create_collection_from_query
p_collection_name = > base_collection,
p_query = > ' SELECT ASAT_DATE, ADMINISTRATION_UNIT_ID, project, SUM (TOTAL_BOOKED_HOURS) as TOTAL_BOOKED_HOURS FROM CAREARR_TOTALS_SUBS2 WHERE ASAT_DATE IN (January 30, 12 ', 2 June 12', 13 February 12 ', 20 February 12', February 27, 12 ', 3 May 12', December 3, 12 ', 19 March 12') AND ADMINISTRATION_UNIT_ID =: P82_ADMIN_UNIT GROUP BY ASAT_DATE ADMINISTRATION_UNIT_ID. PROJECT");

and get the error
ORA-06550: line 5, column 14: PLS-00114: 'SELECT ASAT_DATE, DIRECTORS' identifier too long

The reason is the limitation of the version of Oracle that run in my organization. They are running Oracle 10 g, version of the APEX is 3.0.1
Officials want to see the report, so that dates are not row of columns.
I find that I can use the PIVOT in Oracle 11 g, but not in 10g.
I tried to write the function and make the selection
SELECT distinct get_total_booked_hours (asat_date, project) as "WEEK 1".
, get_total_booked_hours (asat_date + 7, project) as "WEEK 2".
, get_total_booked_hours (asat_date + 14, project) as "WEEK 3".
, get_total_booked_hours (asat_date + 21, project) as "WEEK 4»
, get_total_booked_hours (asat_date + 28, project) as "WEEK 5»
OF CAREARR_TOTALS_SUBS2
WHERE ADMINISTRATION_UNIT_ID =: P82_ADMIN_UNIT AND ASAT_DATE = FEBRUARY 20, 12 '

But the request has taken far too long. (like 5 times than the first).
Now I try to use apex_collection to store the query results that can run faster and then view the report base on apex_collection hat.
But I'm stuck as above.

If anyone has any ideas, please give me some advice.

Thank you very much in advance.
Ann

Hello

You have problem with single and double quotes,
Try

apex_collection.create_collection_from_query(
  p_collection_name => base_collection,
  p_query => q'!
     SELECT ASAT_DATE,
       ADMINISTRATION_UNIT_ID,
       PROJECT_ID,
       SUM(TOTAL_BOOKED_HOURS) AS TOTAL_BOOKED_HOURS
     FROM CAREARR_TOTALS_SUBS2
     WHERE ASAT_DATE  IN ('30/01/12', '06/02/12', '13/02/12', '20/02/12', '27/02/12', '05/03/12', '12/03/12', '19/03/12')
     AND ADMINISTRATION_UNIT_ID = :P82_ADMIN_UNIT
     GROUP BY ASAT_DATE,
       ADMINISTRATION_UNIT_ID,
       PROJECT_ID
  !'
);

Kind regards
Jari

-----
My Blog: http://dbswh.webhop.net/dbswh/f?p=BLOG:HOME:0
Twitter: http://www.twitter.com/jariolai

Tags: Database

Similar Questions

  • Implementation error when creating new version BPA.

    Hi all

    When I try to create new version against BPA I get the error message below. The PAID field is defined as 'RÉCEPTION' at the EPS level. Please let us know why this error is coming and what should be done to remove this.

    Error.jpg

    Thank you

    GHG

    Hello

    This just a pop up message information that is intended to inform the user PAY field is null now and not as "RECEPTION", which corresponds to the value set at this level of BPA.

    If you want to PAY ON the field as 'Reception', please refresh the code ON PAY as 'Back' to the supplier site level, and then try and create a new version against BPA, you won't get this error.

    Waiting for your response.

    Kind regards

    Piyush Kudawale


  • Get an error when creating new attributes

    Hi all

    I'm creating new attributes to the gift list registration form, like 'Phone number', 'City' and so on...
    All attributes are already created in the production_core and database Editions, in the dcs_giftlist table, and the new giftlists.xml file is also created, see below:
    <gsa-template xml-combine="append">
         <item-descriptor name="gift-list" item-cache-size="1000" query-cache-size="1000" display-name-resource="itemDescriptorGiftList">
              <table name="dcs_giftlist" type="primary" id-column-name="id">
                   <property name="clientName" data-type="string" column-name="client_name" category-resource="categoryBasics" display-name-resource="Client Name (Nome do Cliente)">
                        <attribute name="propertySortPriority" value="-10"/>
                   </property>
                   <property name="emailAddress" data-type="string" column-name="email_address" category-resource="categoryBasics" display-name-resource="E-mail">
                        <attribute name="propertySortPriority" value="-10"/>
                   </property>
                   <property name="cityName" data-type="string" column-name="city_name" category-resource="categoryBasics" display-name-resource="City Name (Nome da Cidade)">
                        <attribute name="propertySortPriority" value="-10"/>
                   </property>
                   <property name="phoneNumber" data-type="string" column-name="phone_number" category-resource="categoryBasics" display-name-resource="Phone Number (Numero de Telefone)">
                        <attribute name="propertySortPriority" value="-10"/>
                   </property>
              </table>
         </item-descriptor>
    </gsa-template>
    Although, when I try to call the attribute created on the page, such as "GiftlistFormHandler.cityName", the following error message appears:
    ]] Root cause of ServletException.
    CONTAINER:atg.servlet.jsp.ContainerJspException: atg.droplet.DropletResources->dropletDescriptorCantFindProper
    ty : Can't find property: clientName in class atg.projects.store.gifts.StoreGiftlistFormHandler; SOURCE:atg.dr
    oplet.DropletException: atg.droplet.DropletResources->dropletDescriptorCantFindProperty : Can't find property:
     clientName in class atg.projects.store.gifts.StoreGiftlistFormHandler
            at atg.taglib.dspjsp.IncludeTag.doEndTag(IncludeTag.java:786)
            at jsp_servlet._myaccount.__giftlisthome._jsp__tag22(__giftlisthome.java:1102)
            at jsp_servlet._myaccount.__giftlisthome._jsp__tag21(__giftlisthome.java:1058)
            at jsp_servlet._myaccount.__giftlisthome.access$10(__giftlisthome.java:1032)
            at jsp_servlet._myaccount.__giftlisthome$JspFragmentHelper.invoke0(__giftlisthome.java:820)
            Truncated. see log file for complete stacktrace
    Caused By: atg.droplet.DropletException: atg.droplet.DropletResources->dropletDescriptorCantFindProperty : Can
    't find property: clientName in class atg.projects.store.gifts.StoreGiftlistFormHandler
            at atg.droplet.DropletDescriptor.<init>(DropletDescriptor.java:1368)
            at atg.droplet.DropletDescriptor.getDropletDescriptor(DropletDescriptor.java:1238)
            at atg.droplet.DropletDescriptor.getDropletDescriptor(DropletDescriptor.java:1195)
            at atg.droplet.DropletDescriptor.getPropertyValue(DropletDescriptor.java:443)
            at atg.droplet.DropletDescriptor.getPropertyStringValue(DropletDescriptor.java:245)
            Truncated. see log file for complete stacktrace
    I would like to know if there is any other xml file, that I need to change, or if I need to extend the class FormHandler, adding new attributes.

    Any help will be appreciated,

    Thanks :)

    Hi Lucas,.

    I don't see anyway decent to do this, the only way I think now is that you need to extend GiftListTools and GiftListManager and then 'find and replace' these methods that are called in your implementation. You must also override the addItemToGiftList() method in formHandler.

    In GiftListManager, you will need to override createGiftlistItem() and add the new property, you have recently added in GiftListManager and set it in the repository in createGiftlistItem().
    Ex:
    create mutableRepositoryItem and then
    mutableRepositoryItem.setPropertyValue ("propertyName", "propertyValue");
    for any properties that you want to set.
    If it works then you must override the method to get the point of filing of the database also.

    --
    Angelique

  • Error when creating new record in the jspx page.

    Hello! I have error when you try to post the new record in the jspx page (see: http://my.jetscreenshot.com/2677/20100820-oo8z-19kb)

    DB I trigger and in the EO primary key attribute I Type set to DBSequence.

    Where is the problem and what to do?

    Best regards, Debuger

    @Sireesha excellent point!

    @Debugger the reason why you get the error, it is you're missing an af:convertNumber, however, as said Jean Lou, why even put a DBSequence field on your screen?

    John

  • Error when creating new features in 12 c

    Hi all

    I get an error while I am creating a new developer on my EM Express role in Oracle 12 c:

    ORA-65096: of invalid common name of the user or role

    ORA-06512: at "SYS." PRVTEMX_ADMIN', line 9796

    ORA-06512: at "SYS." "WRI$ _REPT_SECURITY ', line 314

    ORA-06512: at "SYS." DBMS_REPORT', line 744

    ORA-06512: at line 1

    No idea what I'm doing wrong

    Thank you very much in advance!

    Sorry, this area of the forum is not for EM Express or 12 c-specific questions, it's for the Oracle SQL Developer IDE/GUI

  • Satellite P200 - error when creating new recovery disc

    Hello

    I need to format my Satellite P200, but I have some difficulty. I lost the original disc that came with the laptop. I tried using the Recovery Disc Creator, but every time I run the application it I'm greeted by this error:

    An unexpected error has occurred.
    Exit this application and start it again.
    (Error code: 0D00F6-26-00000001)

    Have tried to reinstall, I just get the same error. What should I try next to the difficulty of the creator, or just the format differently?

    Hello

    I'm not very well if the Satellite P200 was equipped with drive recovery procedure HARD but nevertheless it s m worth a try.

    If the HDD recovery procedure is available on your P200, then you should see the Toshiba HDD recovery option in a new window as soon as you click on fix my computer.

    Otherwise, you will need to order the Toshiba Recovery disk:
    https://backupmedia.Toshiba.EU/landing.aspx

  • New to OAF - oracle.jbo.RowCreateException: Houston-25017: error when creating a new entity for HeaderTableEO line

    Hi I'm new to OFA. I am trying to create a master-details form based on the example given on Youtube (but using my own paintings).

    I have already defined in table colums.

    AM code is as follows:

    Public Sub CreateEmailHdrRow()

    {

    xxVmmcSendEmailDefHdrVOImpl vo = getxxVmmcSendEmailDefHdrVO1();

    String s = "Test";

    Line = vo.createRow ();

    If (!) VO.isPreparedForExecution ())

    {

    vo.setMaxFetchSize (0);

    }

    row.setAttribute ("EmailDefName", s);

    row.setNewRowState (Row.STATUS_INITIALIZED);

    }

    When I run, the error occurs at the level of line (rank rank = vo.createRow ();)

    Error message: oracle.jbo.RowCreateException: Houston-25017: error when creating a new entity for xxVmmcSendEmailDefHdrEO line.

    Any help is appreciated.

    Anjan,

    Please check that the type of the CreatedBy attribute is a number representing the id in FND_USER and not the actual text of the name of the user. Standard Oracle columns that use a number for this value not varchar.

    Kristofer Cruz

  • oracle.jbo.RowCreateException: Houston-25017: error when creating a new entity.

    Hi all

    I get the following error when executing the Page create purchase orders. I extended the standard EntityObject class: Purchase Order Header to my EO custom, make one here to this EO origin.
    oracle.jbo.RowCreateException: Houston-25017: error when creating a new entity for CustomPurchaseOrderHeaderEO line

    Thank you

    Hi SumitSharma,

    Added the following line to the file Extended Entity Object.xml
    "DefClass ="oracle.apps.fnd.framework.server.OAEntityDefImpl"xx.oracle.apps"below the RowClass ="... "package line.

    This solved my error, but I can't do it this way is fair or unfair suggestions.

    Thank you

    Published by: 995022 on May 14, 2013 22:13

  • What is the component used to select contact in the field "to:" when create new sms on BB OS 4.6?

    Does anyone know which component is used to select contact in the field "to:" when create new sms on BB OS 4.6? What is KeywordFilterField? If yes - how to customize it to make it look like the sms app? Can you give us some examples of code? I'm new in development for BB and I need this functionality in my application.  I will be very appreciate for any help!

    You will need to implement your own field full auto in this case.

  • I get the Windows 0xc0000135 error when opening new tabs in Google Chrome. Help!

    I get the Windows 0xc0000135 error when opening new tabs in Google Chrome. Help!

    It gets really annoying. The very first 2 or 3 times I opened a new tab, I get this error message and
    I have to close and open a new one until I get a tab that works. Anyone who can help is greatly appreciated.
    -Eric

    Hi EricKelso,

    The question you have posted is related to Google Chrome and would be better suited to the community of Google chrome. Please visit the link below to find a community that will support what ask you
    http://www.Google.com/support/forum/p/chrome

  • Photoshop cs6 shifts when creating new file

    When creating a file the program is lagging about 4 to 7 seconds, when I save the file and re - open, there is no lag, at the opening of the older files is no this lag as well. When looking at the CPU usage, it seems to choke when creating new files. Does anyone have the same problem? I've updated photoshop and all my drivers. My system below features:

    Windows 10

    I7 - 4790 k

    GTZ 780

    16 GB of ram

    OK, figured out, this is the plugin extensis font management, I update that I have to leave for now, but now the system is back and catchy as usual, thanks to all.

  • error when creating a new partition "the operation you selected will convert the selected disk from basic to dynamic disk...". »

    Original title: getting the error while creating a new partition

    here to create a new partition get the error "the operation you selected will convert the disc selected basic to dynamic disk... etc" Please help.

    I would like to join the screenshot of the error, how?

    Hello

    1 have had any changes made on the computer before the show?

    2. how many partitions are there currently on the computer?

    3. how many hard disks on the computer do you use?

    4. when exactly you get the error message?

    I suggest you refer to the article and try to follow the steps and check if you are able to create a partition:

    Create a new Partition on a hard disk in Windows 7

    http://TechNet.Microsoft.com/en-us/magazine/gg309170.aspx

    I also suggest you the link and attach a screenshot of the screen.

    http://answers.Microsoft.com/en-us/Windows/Forum/Windows_7-security/how-do-i-post-a-screen-shot-on-this-forum/c86de820-C620-401c-A804-9f6337cd3053

  • Error when creating a new DAC connection using the MSSQL connection type

    Hello

    I am trying to create a connection DAC, i.e. a new repository DAC in the SQL Server 2008 database.
    Version of the DAC: 10.1.3.4.1
    Database: SQL Server 2008


    I downloaded from the link below sqljdbc4.jar file and placed it in the D:\orahome\10gR3_1\bifoundation\dac\lib folder.
    [http://www.microsoft.com/en-us/download/details.aspx?displaylang=en & id = 11774]

    I entered all the details correctly to the name of the database, the database host, port of the database. I created a new file for authentication.

    I get error when I try to test the connection below.

    Driver MESSAGE: MSSQL not available!
    CLASS EXCEPTION: java.lang.IllegalArgumentException

    com.siebel.etl.gui.login.LoginDataHandler$ LoginStructure.testConnection (LoginDataHandler.java:512)
    com.siebel.etl.gui.login.LoginDataHandler.testConnection(LoginDataHandler.java:386)
    com.siebel.etl.gui.login.ConnectionTestDialog$ Executor.run (ConnectionTestDialog.java:290)

    : CAUSE:
    MESSAGE: com. Microsoft.SqlServer.JDBC.SQLServerDriver
    EXCEPTION CLASS: java.lang.ClassNotFoundException

    java.net.URLClassLoader$ 1.run(URLClassLoader.java:200)
    java.security.AccessController.doPrivileged (Native Method)
    java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    Sun.misc.Launcher$appclassloader$ AppClassLoader.loadClass (Launcher.java:276)
    java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
    java.lang.Class.forName0 (Native Method)
    java.lang.Class.forName(Class.java:169)
    com.siebel.etl.gui.login.LoginDataHandler$ LoginStructure.testConnection (LoginDataHandler.java:510)
    com.siebel.etl.gui.login.LoginDataHandler.testConnection(LoginDataHandler.java:386)
    com.siebel.etl.gui.login.ConnectionTestDialog$ Executor.run (ConnectionTestDialog.java:290)


    The error seems to be a problem of connectivity to SQL Server. I use the correct jar file?

    Please, help me to solve this problem. Appreciate the help given on this forum earlier.

    Thank you

    Add
    .\lib\sqljdbc4.jar
    at the end of the line beginning with SQLSERVERLIB in the file config.bat

    Pls correct brand

  • Display of the error of period q, PA when create new project

    Hi all

    I am facing a problem when creating a project template, although I opened PA and GL class periods, but it is still showing following error of

    "Impossible to copy a budget for a period that is beyond the reach of the system defined periods (e.g. PA period or GL).

    Please help me solve this.

    Regads
    Madhu

    Hello

    I guess that your budget model has periods within the date range of the model project, between the start date and the completion date of the project.

    When you copy the template to create a new project, enter the start date of the new project as the start date of the model. If your start date of the project is different from the date of beginning of the model, the system will try more end date and also, try moving the fiscal years, for those who will canned the same length, but from the new project start date. In these cases you can either create budgets in other periods and then initial budget model.

    Dina

  • Error message appears when creating new bookmarks

    Creating new bookmarks a context menu appears with the following information:
    Download: [Exception... ["Component retyrned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIObserverService.removeObserver]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame: chrome://trustchecker/content/trustchecker.js: anonymous: line 955" data: no]

    The bookmark is saved at the bottom of the list, but it is not possible to select the folder to save the bookmark. How can I solve this problem?

    In my view, that Checker Trust belongs to Zone Alarm, to test this try to disable Zone Alarm Add-ons in Firefox to see if you can then create new bookmarks.

    To disable extensions:
    Click on the Tools menu, and select Add-ons. Modules window appears.

    1. In the window modules, click the Extensions Panel. The list of installed extensions is displayed.
    2. Click on the name of an extension in the list to select it.
    3. Click on disable to disable the selected extension.
    4. Click Restart Firefox.

    If it turn out to be the extension of the Zone Alarm causing the problem, look for the Zone Alarm updates, otherwise you can report the problem to them.

Maybe you are looking for