How to change sql expression of SQL-Calculated Attribute of view object ?

Hi
jdev 11.1.1.5
I have a view object with a SQL-Calculated Attribute (sumAnalytic) how can I change sql expression of this attribute in runtime?
for example in application module method??

Hi Mr Timo
Thanks for your reply but I do not need dynamic vo because I can not change all of my vo
I only need to change expression of SQL-Calculated Attribute of view object in run time.
For this I set expression in view object something like this 'select 2 from dual' and in run time in my AM method I get the vo query and replace 'select 2 from dual' with something like 'selet sum(amnt) over (partition by 1)' and set new query.
But I think the better solution must exist
Thanks

Similar Messages

  • How to change Rendering Extension in sql server Reporting Services based on User Permissions

    Hi,
    I want to provide SQL server reporting services rendering extension based on user Access.
    For Example
    User1 can have options of Rendering to EXCEL and PDF
    User2 can have a option of CSV
    i read one article which is useful for report basis rendering extension changes. but i want to give user basis rendering options.
    http://www.mssqltips.com/sqlservertip/3569/how-to-change-rendering-extensions-in-sql-server-reporting-services/?utm_source=dailynewsletter&utm_medium=email&utm_content=headline&utm_campaign=20150406
    Thanks in advance.
    GVRSPK VENI

    You can use a data driven subscription for that
    Maintain a table with rendering extension information for various users ie their AD user login. Then setup a data driven subscription based on table values
    You will be creating a dataset with query for retrieving userid as well as rendering extensions and then just set the value as Get value from database for  render Format and To properties 
    For more details refer
    http://beyondrelational.com/modules/2/blogs/101/posts/13460/ssrs-60-steps-to-implement-a-data-driven-subscription.aspx
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Moving from SQL Express to SQL Server

    Our Robosource Control v3.1 database just hit the 4GB limit with SQL Express. Could anyone pass along any advice for changing to from SQL Express to SQL Server 2008?
    Many Thanks!

    I don't have any direct experience with this, as we started off with SQL server. However, there's a promising-looking feature that might help you: the RoboSource Convert wizard (RSO3ConvertWizard.EXE), which you can get to from the Start menu. There's a selection in the Convert wizard for a 3.1 to 3.1 database copy--I'm guessing that would be what you want.
    HTH,
    G

  • How to change NLS parameters in SQL Developer?

    I think that Oracle National Language Support is quite confusing. How can I easily change NLS parameters for SQL Developer (for all connections) to match exactly those that my database is using?

    Hello,
    SELECT 5/8 x FROM dual;F9 -> 0.625
    Change decimal separator in preferences
    F9 -> 0,625
    It is different when I execute a query/script with F5, then I always get 0.625
    SELECT * FROM nls_session_parameters
    WHERE parameter = 'NLS_NUMERIC_CHARACTERS';
    PARAMETER                      VALUE
    NLS_NUMERIC_CHARACTERS         .,
    SELECT 5/8 x FROM dual;
             X
         0.625
    Change settings
    SELECT * FROM nls_session_parameters
    WHERE parameter = 'NLS_NUMERIC_CHARACTERS';
    PARAMETER                      VALUE
    NLS_NUMERIC_CHARACTERS         ,.
    SELECT 5/8 x FROM dual;
             X
         0.625Even changing the settings with ALTER SESSION makes no difference
    ALTER SESSION SET NLS_NUMERIC_CHARACTERS = ',.';
    SELECT * FROM nls_session_parameters
    WHERE parameter = 'NLS_NUMERIC_CHARACTERS';
    PARAMETER                      VALUE
    NLS_NUMERIC_CHARACTERS         ,.
    SELECT 5/8 x FROM dual;
             X
         0.625
    ALTER SESSION SET NLS_NUMERIC_CHARACTERS = '.,';
    SELECT * FROM nls_session_parameters
    WHERE parameter = 'NLS_NUMERIC_CHARACTERS';
    PARAMETER                      VALUE
    NLS_NUMERIC_CHARACTERS         .,
    SELECT 5/8 x FROM dual;
             X
         0.625It seems the script output does not care about my settings :-(
    Regards
    Marcus

  • "Disable Check for SQL Express" against SQL Server Agent

    Good afternoon,
    Seeing as it has been a know issue for many years now[1],
    is there a reason why Microsoft has yet to include a “Disable Check for SQL Express” override (similar to the
    Automatic Configuration (& other) monitors) for each of the following objects included in the
    Microsoft SQL Server Management Pack?
    SQL Server Agent Windows Service (Monitor)
    Discover SQL Server Agent for a DB Engine (Discovery)
    This would prevent me from have to continually create overrides
    disabling the monitor|discovery each time a new instance of SQL Express is installed in our Management Group.
    Thanks,
    Larry
    [1]
    http://jmkehayias.blogspot.ca/2009/01/sql-server-2008-express-sql-agent-won.html
    http://sqlblogcasts.com/blogs/sqldbatips/archive/2008/06/28/sql-server-2008-express-installs-sql-agent-but-don-t-bother-trying-to-start-it.aspx

    Hello,
    This is much easier
    http://blogs.technet.com/b/emreguclu/archive/2013/01/21/undiscovering-stop-monitoring-sql-2008-express-editions.aspx
    just exclude sqlexpress
    Regards
    Mohammad, IT NOC Team

  • How to use the Calculated attibute in view object

    Hi,
    I have a view object query with the calculated attribute name as 'TRANCODE' in the below sql.This query works for the initial page loading.
    After the page gets loaded, there is a search section in the same page at the top.
    Here i will have to build the whereclause to the same query and retrieve the values.
    i am using jDeveloper 10.1.3.1, with adf and jHeadstart.
    Can some one tell as how to use the calculated attribute TRANCODE in whereclause?
    SELECT /*+ first_rows(10) */
    BatchCntl.FILE_CNTL_ID,
    CASE WHEN chk_bit(Entry.ENTRY_FLAGS, 2)='Y' OR Entry.ENTRY_SUBSTATUS = 'D' OR Entry.ENTRY_SUBSTATUS = 'J'
    THEN
    CASE eeh.TRAN_CODE
    WHEN '21' THEN 'C'
    WHEN '22' THEN 'C'
    WHEN '31' THEN 'C'
    WHEN '32' THEN 'C'
    WHEN '26' THEN 'D'
    WHEN '27' THEN 'D'
    WHEN '36' THEN 'D'
    WHEN '37' THEN 'D'
    ELSE eeh.TRAN_CODE
    END
    ELSE
    CASE Entry.TRAN_CODE
    WHEN '21' THEN 'C'
    WHEN '22' THEN 'C'
    WHEN '31' THEN 'C'
    WHEN '32' THEN 'C'
    WHEN '26' THEN 'D'
    WHEN '27' THEN 'D'
    WHEN '36' THEN 'D'
    WHEN '37' THEN 'D'
    ELSE Entry.TRAN_CODE
    END
    END AS TRANCODE,
    FROM Batch_Cntl BatchCntl, Entry, ENTRY_EDIT_HIST eeh
    WHERE (BatchCntl.BATCH_TYPE = 'E')
    AND (BatchCntl.BATCH_STATUS in ('A','D','R','P'))
    AND entry.in_batch_cntl_id = BatchCntl.BATCH_CNTL_ID
    and Entry.fi_rt = eeh.fi_rt (+)
    and Entry.entry_id = eeh.entry_id (+)
    AND (Entry.ENTRY_STATUS in ('A','D','R','P'))
    ORDER BY BatchCntl.BATCH_CNTL_ID, Entry.entry_id
    regards
    Raj.

    Let's say your application module is com.yourcompany.someapp.services.MyService, and let's say you authored a method like the following in the MyServiceImpl.java file:
      public void doSomething(int i, String s) {
      }and you exposed this AM custom method using the AM editor.
    BC4J design time will automatically create you the com.yourcompany.someapp.services.common.MyService interface that will look like this if you go look at the source code:
    package com.yourcompany.someapp.services.common;
    import oracle.jbo.ApplicationModule;
    public interface MyService extends ApplicationModule {
      public void doSomething(int i, String s);
    }To use your custom method from a client, just cast your ApplicationModule to your custom interface like this:
    import com.yourcompany.someapp.services.common.MyService;
      MyService mySvc = (MyService)yourAM;
      mySvc.doSomething(1,"foo");

  • How to change an characteristic to an navigation attribute?

    Hello everyone!!
    Does anybody knows how to change a characteristic that is on a POS to an attribute navigation of another characteristic that is in the same POS without deactivating it?
    An infocube has the same POS characteristics. So, if I do this modification, the infocube will be automatically chaged? I think not, but I want to avoid manually changing almost everything.
    Thanks in advance!!
    Regards

    Hello Heidi
    Sorry if I took so long to answer.
    Unfortunately you will have do deactivate the POS and of course change all the infocubes, infosources, etc, that are involved with this change. If you deactivate your POS, all the CVC´s are eliminated, so it will be better if you backup all the data in your live cache in an backup infocube.
    When you change the characteristic to an navigation attribute and also change the infocube, the data in the infocube will adjust automatically. You will have to create the CVC´s again with the new "format". But in the infocube, it won´t be necessary.
    I hope it helps.
    Best Regards
    Angela

  • How to change back Std Hierarchy layout in OKEON after using object mgr?

    Hi guyz,
    I was using object manager in OKEON to find a certain cost center.
    However, the layout only displaying one sub group instead of overall view of the Standard Hierarchy the way it was (before I use Object Manager function).
    I need to change back the layout to overall view of the Standard Hierarchy consisting of all subgroups and all cost centers.
    How to change it back?
    Need your answers asap...Thanking you

    Solved by clicking cost center group in Object Manager and fill with Standard Hierarchy's name (Top node of the standard hierarchy)

  • How to do a calculated field in view object

    I am using Jdeveloper 11 R2 (11.1.2.3)
    In some use case I require to calculate a field based on information from another view object
    I came with idea of a transient attribute in first view object and try to initialize it in getter method in RowImpl
    But I dont know how I can access another view object in RowImpl class
    Any solution or suggestion?
    Appreciate your comments
    Regards
    Mohsen

    Create a view accessor in the VO from which you want to access another VO.
    get the other VO using the getter of the View accessor into a rowset obj.
    setnamedwhereclauseparams if needed.
    executequery and then iterate over the rs to get whichever attribute you want - note the attribute should be the attribute in the called VO.
    Edited by: bigchill on 6/03/2013 17:37

  • How to programmatically retrieve the real field name from a view object ?

    Dear all,
    when I map a business component (a database table) to a view, the fields are automatically converted by JDeveloper, for example, a field named 'user_id' in the oracle table definition, becomes 'userid' in the view.
    The question: how can I retrieve the right table column name from within a backing bean ? Please explain also what should I bind and how; should I use an iterator ?
    Another more: since we can change the label of a field on a view, how can then I get the mapping between the column name on the view and the column name on the table in the database ?
    Thanks in advance,
    Sergio.

    Hi Timo,
    many thanks for your answer.
    The rest of my question: you know we can drop a view from the DataControls onto a ADF page, with each field of the table having a label.
    That label is initially set like the internal table field name, so for instance, if user_id is the real table field name, userid will be the (by JDeveloper) internal renamed table field name, and the label would be userid too.
    If I then change the label text to, for example, "myUserid", the question is: how can I know which real table field does "myUserid" point to ?
    In other words, when my form is submitted, I want to know which field name has been changed and prepare an update sql in a bean.
    For this purpose I bind each view field to a validator function in the bean, and collect al the pairs "label_name + submitted value" in an hash table.
    Now inorder to build up that update query, I need the mapping between the label_name ("myUserid") and the real table field name ("user_id"). The question: how to map the label to the real table field name ?
    By the way, I'm using JDeveloper 11g rel. 2.
    Regards,
    Sergio.

  • How do I programmatically get the display name for a view object in Java?

    When you define a view object, there is a display name that is configured. I would like to retrieve that in Java. Can someone tell me how?
    Thanks, -Klaus

    Klaus,
    you can use the attribute definitions which you get using
    getAttributeDefs
    AttributeDef[] getAttributeDefs()This method is accessible via the vo.
    If you need this information in a bean, you can use EL like you see if you drop a vo on a page.
    Timo

  • How to change field size using SQL against an oracle Database

    I am an admitted novice user, looking to become more proficient.
    I have a field in a table that I need to expand the field size. The table is called Inquiries. The data type is text. The current Field Size is 10. I want to increase it, to either the max, or somethign long enough to fit TECHNOLOGY LEADERSHIP PROGRAM.
    What is the SQL command to change the field size, and what is the max for a Text Field Size

    And/Or, an even better question might be,
    Do I need to use SQL*PLUS to do this, or are there better tools. I.e, I like how in Access, you can open up a database in Design view and just change the amount for the field size. Is there a similar "easy" method to do something like that with an Oracle database.
    My current version of the server/database is:
    Connected to:
    Oracle9i Enterprise Edition Release 9.2.0.6.0 - Production
    With the Partitioning option
    JServer Release 9.2.0.6.0 - Production
    I was thinking I had to do SQL commands to perform the action, but there may be another way that I am not thinking about with all of the tools at my disposal. When I installed Oracle on my desktop, I installed most of the management tools and networking services, if that helps

  • How to use 'IN' expression for SQL in DB adapter

    Hi,
    I am working on BPEL PM 10.1.3.3 and need to configure db adapter to get multiple values for one parameter similar to " where deptid in ('1,2,3)".
    While configuring the adapter I am not able to find any such option. Also I need to use custom SQL. I have already tried SQL given below
    select deptname from dept where dept in (#deptID)
    This type of SQL generates an error. I am sure there should be a way to achieve this but donot know how to :(
    -AAg

    This is not possible. You should program on advance the amount of IN paramaters
    IN (#p1, #p2, #p3, #p4)
    or
    IN (#p1, NVL(#p2, #p1), NVL(#p3, #p1), NVL(#p4, #p1))

  • ORA-00936 error from SQL expression in SQL*Loader script

    I am getting the above error on the following line in my SQL*Loader script:
    DIA_CLM_RES_OID DECIMAL EXTERNAL
    "SELECT N_ORG_ENTY_ID FROM TESTG4.ORG_ENTITY
    WHERE N_USER_ID =
    (SELECT UNIQUE WSR_NT_ID FROM CONV_CLM_RESOURCE
    WHERE CLM_RES_OID = :DIA_CLM_RES_OID)",
    What I am basically trying to do is a 2-table lookup of a value:
    1. Find a row in table CONV_CLM_RESOURCE where the value in column CLM_RES_OID matches the value in the input file in field DIA_CLM_RES_OID.
    2. Take the value of field WSR_NT_ID from that row and use it to find a row in table TESTG4.ORG_ENTITY.
    3. Take the value of field WSR_NT_ID from that row and set it in the target table in field DIA_CLM_RES_OID.
    In other words, I am essentially trying to translate the input value by using two other tables to lookup the value to translate to. However, no matter how I arrange it, I keep getting the "ORA-00936: missing expression" error on this statement.
    Can anyone see what I am doing wrong, or perhaps suggest a better way of accomplishing a two-table translation of a value?
    Thanks!

    Still not sure why this doesn't work, but I was able to create and use a function to do this instead, which is probably a better approach anyway.

  • How to change the mining type of an attribute?

    Quite often, when I build a model with Naive Bayes algorithm (using DBMS_DATA_MINING package) I get a model with some attributes
    being type of VARCHAR2 and categorical mining type although the
    data type of these attributes are NUMBER.
    My question is, on what basis does ODM assign mining type to an attribute?
    Is that the number of distinct values of an attribute?
    Can I change these mining types somehow using PL/SQL?
    I'm using ODM 10g R2
    Thank you
    Luke

    Quite often, when I build a model with Naive Bayes algorithm (using DBMS_DATA_MINING package) I get a model with some attributes
    being type of VARCHAR2 and categorical mining type although the
    data type of these attributes are NUMBER.
    My question is, on what basis does ODM assign mining type to an attribute?
    Is that the number of distinct values of an attribute?
    Can I change these mining types somehow using PL/SQL?
    I'm using ODM 10g R2
    Thank you
    Luke

Maybe you are looking for