How to generate the HAVING clause?

Hi all

When I add a function like the SUM, the code generates the "group by" clause by default. I also want to generate the clause "have" about it, how to do this in ODI?

-Ian.

Hello

In your interface drag and drop the source column in the Web for which you want to generate the HAVING clause.
It will create filters for columns. Now use the aggregation works like SUM, MIN, MAX, AVG etc. in this filter query.

The generated code will now contain the inside HAVING clause.

Thank you
Fati

Tags: Business Intelligence

Similar Questions

  • Query with the having clause

    Hi all

    I have this select statement to help to filter different from zero records.

    Select GroupName, Nom_liste,

    Sum ((a_cost/1000) * degradation * quantity * total_count * index) such as total_cost,.

    FROM MyTable

    having sum ((a_cost/1000) * degradation * quantity * total_count * index) <>0

    Group GroupName, Nom_liste

    Having done so the query to run more slowly.

    How can I filter records with zero total_cost (they can be negative or greater than zero).

    Thank you!

    Hello

    user9542267 wrote:

    Hi all

    I have this select statement to help to filter different from zero records.

    Select GroupName, Nom_liste,

    Sum ((a_cost/1000) * degradation * quantity * total_count * index) such as total_cost,.

    FROM MyTable

    having sum ((a_cost/1000) * degradation * quantity * total_count * index) <> 0

    Group GroupName, Nom_liste

    Having done so the query to run more slowly.

    How can I filter records with zero total_cost (they can be negative or greater than zero).

    Thank you!

    The query you posted should not take more time with or without the HAVING clause.  The right of the comma before 'from' causes a compilation error very quickly anyway.

    If you get no result other than an error message, then this is not the code you are running.  Show the code you actually run, or a simplified version that has the same problem.

    For all performance issues, see the FAQ forum:

    https://community.Oracle.com/message/9362003#9362003

    If the problem was really in the HAVING clause, then you can try something like this:

    WITH got_total_cost AS
    (
    SELECT GroupName, Nom_liste
    , SUM ((a_cost/1000) * degradation * quantity * total_count * index) SUCH as total_cost
    FROM MyTable
    GROUP BY GroupName, Nom_liste
    )
    SELECT *.
    OF got_total_cost
    WHERE as total_cost <> 0
    ;

    but it would be very surprising he made all the difference.  I suspect that the problem is not really in the HAVING clause.

  • Using the HAVING clause

    I have trouble understanding the following query:

    SELECT cust_city, COUNT (cust_last_name)

    Customers

    WHERE cust_credit_limit > 1000

    GROUP BY cust_city

    HAVING AVG (cust_credit_limit) BETWEEN 5000 AND 6000

    According to my preparation for the review, it will work successfully without errors, although I don't understand why.

    The AVG (cust_credit_limit) should also be included in with the rest of the fields to make it work correctly?

    It would be greatly appreciated if someone could explain it to me better.

    Thank you

    Sean

    5285cd35-2ff3-432e-B2FD-19285481be60 wrote:

    I have trouble understanding the following query:

    SELECT cust_city, COUNT (cust_last_name)

    Customers

    WHERE cust_credit_limit > 1000

    GROUP BY cust_city

    HAVING AVG (cust_credit_limit) BETWEEN 5000 AND 6000

    According to my preparation for the review, it will work successfully without errors, although I don't understand why.

    The AVG (cust_credit_limit) should also be included in with the rest of the fields to make it work correctly?

    It would be greatly appreciated if someone could explain it to me better.

    Thank you

    Sean

    No - the AVG function doesn't have to be in the select list. Explain why you think it should be.

    How would it make a difference if you added to the SELECTION list and ignored, then?

    When you have questions DOC the first thing you need to do is RTFM. See the HAVING clause in the RFSO of the SQL language

    http://docs.Oracle.com/CD/B28359_01/server.111/b28286/statements_10002.htm

    >

    HAVING clause

    Use of the HAVING clause to restrict groups of returns of the lines to these groups for which the specified condition is TRUE .

    >

    As the doc t says

    He HAVING condition applies to the 'groups '.

    If you use the HR. EMPLOYEES table you can see the effect of the HAVING clause. This query is similar to yours but with none HAVING clause, and the AVG (salary) added to the selection list to see which groups will have

    >

    Select department_id, count (last_name), avg (salary)
    employees
    where salary > 500
    Group by department_id

    1. DEPARTMENT_ID, COUNT (LAST_NAME), AVG (SALARY)
    2. 10,1,4400
    3. 20,2,9500
    4. 30,6,4150
    5. 40,1,6500
    6. 50,45,3475.55555555556
    7. 60,5,5760
    8. 70,1,10000
    9. 80,34,8955.88235294118
    10. 90,3,19333.3333333333
    11. 100,6,8601.33333333333
    12. 110,2,10154
    13. 1,7000

    >

    Note that 60 is the ONLY group with AVG (salary) between 5000 and 6000

    Now, try the query using the HAVING clause

    >

    Select department_id, count (last_name)

    employees

    where salary > 500

    Group by department_id

    having avg (salary) between 5000 and 6000

    DEPARTMENT_ID, COUNT (LAST_NAME)

    60.5

    >

    Only group 60 has been selected - the HAVING condition has been applied to the first query GROUPS, not the lines.

  • How to generate the report on rules

    How to generate the report on rules with id recipient and with a few keyoword in a rule.

    The rule management dashboard has an integrated 'report rules', you can configure properties and input parameters.

    For rule management dashboard, click homes > Administration > rules. In the upper right, next to the date and time, click reports.

    You can also find these helpful videos: http://edocs.quest.com/foglight/5610/Foglight_Reports_videos.php

    Hope this helps,

    Shay

  • How to generate the alert when pageitem move on the page? and what class boss be use to move pageitem

    How to generate the alert when pageitem move on the page? and what class boss be use to move pageitem

    Hi Philippe,.

    You can see the kDocBoss for the ClassID with the PMIID IID_ITRANSFORM_DOCUMENT kLocationChangedMessage.

    Markus

  • How to generate the array Diagnostic Utility ADU for Esxi server

    How to run Diagnostic Utility ADU or HP Insight Diagnostics HP Insight Diagnostics table to collect the status tables and logs data FRO an Esxi Server

    How to generate the array Diagnostic Utility ADU for Esxi server

    Example:

    Download the package .vib here: http://vibsdepot.hp.com/hpq/feb2013/esxi-5x-vibs/hpacucli/hpacucli-9.40-12.0.vib

    and place it on a store of data seen by the host...

    Install it using the CLI:

    software esxcli vib install d vmfs/volumes //hpacucli-9.40-12.0.vib

    Now run it:

    ~ # cd/opt/hp/hpacucli/bin

    / opt/HP/hpacucli/bin # . / hpacucli

    HP Array Configuration Utility CLI 9.40.12.0

    Detection of controllers... Fact.

    Type 'help' for a list of supported commands.

    Type "exit" to close the console.

    => ctrl all diag file=/tmp/my_ADUreport.zip ris = on = on zip xml = on

    Generation of diagnostic report... done

    -Online output

    / opt/HP/hpacucli/bin #.

    my_ADUreport.zip in / tmp can now be downloaded from the host...

    It could be that useful...

    / Rubeck

  • How to generate the sequence Island-1, -1, 1, 1...

    How to generate the sequence Island-1, -1, 1, 1...

    This seems to work:

    create sequence sss start with -1 increment by 2 minvalue -1 maxvalue 1 cycle nocache;
    
  • How to generate the ddl for unlimited quota

    Hi all

    DB: Oracle 9.2.0.4
    OS: Solaris 8

    I have a 12 tablespaces and 18 users of the application.
    I would like to grant an unlimited quota for all users on all areas of storage, to find out how to generate the ddl script.

    ex: change the dataagent user quota unlimited on DSOM.

    can anyone help us.
    Thank you
    KK.

    All users in all areas of storage?

    Select "edit user" | user name | "quota unlimited on | nom_tablespace | ';'
    from dba_users cross join dba_tablespaces
    When not in dba_tablespaces.tablespace_name ('SYSTEM', "SYSAUX");

    Please, be careful with this

    HTH
    Antonio NAVARRO

  • How to generate the script to insert data tables present in a

    How to generate the script to insert data from one table in an entire schema under environment sqlplus




    with toads it please help me please!

    905310 wrote:
    How to generate the script to insert data from one table in an entire schema under environment sqlplus
    with toads it please help me please!

    The correct method by using the pump of the database or import/export or unload the data in CSV format for loading using SQL * Loader.

    Generate instructions insert with literals is very bad choices - the bind variable is missing. It will be quite slow because many other CPU cycles are spend on hard analysis. The shared pool will become fragmented. This can cause errors of memory for other applications when they attempt to analyze SQLs for cursors.

  • How to generate the random password policy password knowing resources

    Hello

    Any body tell me how to generate the random password policy password knowing the purpose of resource in OIM11g

    Kind regards
    Mireille Nayan

    Hi Pascal,.

    You can try the below code snippet:

    UserRepository your = new DBUserRepository();
    UserInfo user = your.getUserInfo (take);
                   
    ResourceRepository rrepo = new ResourceDBRepository();
    Resource = rrepo.findResource (resourceName);
              
    By PasswordPolicyAssignmentsRepository = new PasswordPolicyAssignmentsDBRepository();
    PasswordPolicyRepository ppr = new DBPasswordPolicyRepository();
    The list of passwordPolicyAssignments = par.getPasswordPolicyAssigments (resource);
    PasswordPolicy passwordPolicy;
                   
    PasswordPolicyAssignment passwordPolicyAssignment = passwordPolicyAssignments.get (0) (PasswordPolicyAssignment);
    If (isApplicable (passwordPolicyAssignment, {getMappedAttributes (userInfo.getAttributes ())})})
    passwordPolicy = ppr.find (passwordPolicyAssignment.getPasswordPolicyID ());
    }
    RPG RandomPasswordGeneratorImpl = new RandomPasswordGeneratorImpl();
    password = rpg.generatePassword (userInfo, passwordPolicy);

    Kind regards
    GYAN

  • How to generate the password encoded using agent in ODI?

    Hello

    I've created a scenario and I plan to them. Now, I want to create an autonomous agent to run this scenario. To do this, I update odiparams.bat file where I am mentioning the details of the repository. I want to generate the encoded password repository connection using batch processing utility officer. After you type following command at the command prompt in windows xp:
    agent to encode the password
    Failure of the sound connection password invalid username error display.

    What should do? How to generate the password encoded using batch agent utility?

    Thank you
    Shrinivas

    Published by: Shrinivas Dayma on 13 Aug 2011 02:03

    Hi Shrinivas,

    This command is for ODI 10 g.

    For 11g,.

    Encode

    Thank you
    Guru

  • How to generate the WSDL in CCB231

    How to generate the WSDL in ccb231? I'm not able to use the WSDL generated to XAI inbound service like soapUI gives importing problem. I couldn't open the schema editor to generate the WSDL as ODBC driver is missing from my windows machine 7. Any suggestions please

    What kind of import errors that you get with soapUI?

    I have a virtual machine running CC & B 2.3.1 with SoapUI 3.6.1 and when I import the WSDL generated by XAI Inbound Service it runs smoothly.

  • How to generate the full javadoc?

    How to generate the full javadoc?

    I create several javabeans and each of them has one or more methods. I add javadoc comments and run javadoc * .java. It can create new javadoc, but only for this java class.
    How to generate a full javadoc?
    I use Jdeveloper 10 g. If someone knows how to do in Jdeveloper 10 and 11g, please help me.

    Thank you

    YE,

    11 g, you can right click on the project and choose "javadoc .

    In 10g, you can select the project and choose the menu 'javadoc ' run.

    John

  • [JDev ADF] How is made the ' where clause ' default display criteria "all searchable attributes?

    Hallo,


    on a view object, I create my view of the criteria customized; I'm going to use it to create a "query with the table panel.

    I wish that his beahviour, when I use it to create a "query with the table panel", corresponds to that of "attributes searchable all.

    Unfortunately I'm having some trouble in his creation and I would like to see how is made the "object view where Clause" CV "all searchable attributes.

    My VO motion is:

    Select the username, name, RegisteringDate

    I would like to create my VC in a way that is the result "query with table Panel:

    UserId | ___ |

    Name | ___ |

    RegisteringDate of | ___ | to |_________|

    For each search field, I set a variable binding (PName, PUserId, PRegisteringDateTo, PRegisteringDateFrom).

    Each field must be used in the "query with table Panel" only if it is filled with a value.

    You kindly help me?

    Thank you very much

    F.

    The criteria to view all searchable attributes is implied all the attributes of a vo. Each attribute is used unless you specify a value for it. The problem with this IS, is that you can not change it.

    However, you can build your own RESUME that works in the same way, but allows you to change certain attributes. To do this, you create a new business card and add each attribute, select the operation you want to test the attribute against (equals, start by,...). You do not bind variables for attributes specify. The framework will add them for you automatically.

    The only thing that can not this vc is check varies as you want to do when you check "RegisteringDate." To do this you must use bind variables.

    Once you have create this EGG and it makes you drag onto the page you can use it as the "all attributes searchable.

    Timo

  • How to generate the primary key element and move to another page?

    How to make the primary key value to another page in a table?

    Form on T_ITEMS 2.png

    Hello

    I am a beginner in the apex,

    Please, now I want to add the primary key to page 1 for item id in page 2...

    Notice:

    Before, I created (process of pl/sql in the rendering of page @ after the header section) to get the id of secuance.

    BEGIN
    :P17_ID := seq_t_items_id.NEXTVAL;
    END;
    
    
    

    primary key is generated for the element ID of page 1... BUT When I update 'page 1' I see error and solved when shut down my browser and open it again...

    Please help me to...

    1. Generate a primary key (article id @ page 1)... without refresh error. ?
    2. Pass him (item_id) on page 2

    Thank you all for...

    Sorry I'm beginner in apex,

    I don't know how Pass value of the item_id TO page 1 page 2 "in the form ID", turn to the first PHOTO... .
    Help me..

    Thank you

Maybe you are looking for