Calculation that uses the function Max Analytics

Hello world

Hope all is welll...
I have 2 Calc:

1) Calc_HippaToSortNumber who does:
DECODE (hold desc, 'HIPAA', 999, NULL, 0, 500)

2) Calc_MaxHoldDesc that uses the above calc in analytic function:
Max (Calc_HippaToSortNumber) MORE (Student.Id PARTITION)

I have a condition that uses the two Calc for:
Select the line that corresponds to the max value of Calc by partition

Calc_HippaToSortNumber = Calc_MaxHoldDesc

I get the results I want, but I do not understand how works Discoverer:
Calc 1 - should be the level of the detail line to assign a number based on a field to hold alpha Desc
If keep Desc = Hippa, 999
= Null, 0
other values, 500

Calc 2 - is an analytic function, so it happens after query calculates its results in detail

BUT THE condition is testing the analytical function: this condition runs after the execution of the analytical function
against all preliminary results?
How does he know Scout to perform the function after execution of the analytical function
instead of on the level of detail / row?

The following test data:
pls advise, tx, sandra

ID take Fname Lname desc calc_HippatoSortNumber
==============================================================
1 adams alice Certification BLS 500 max (500)
2 Brown brett HIPAA 999 max (999)
4 BLS Certification 500 Caroline Chin
4 Caroline HIPAA 999 (999) max Chin

I want to show only 3 lines using the analytical function max for the id field studying and comparing each
the partition to the max value line and by selecting the line with the max value.
1 adams alice BLS Certification 500
2 Brown brett HIPAA 999
4 Caroline HIPAA 999 Chin

Hello

How does he know Scout to perform the function after execution of the analytical function

instead of on the level of detail / row?
Discoverer always runs the latest analytical functions and therefore conditions by using analytical functions are also processed last. Discoverer for this by using a query online and therefore the structure of the SQLused

Select Lname, Id, Calc_MaxHoldDesc, Calc_HippaToSortNumber)
SELECT Id, Lname, DECODE (hold desc, 'HIPAA', 999, NULL, 0, 500)
Calc_HippaToSortNumber, MAX (DECODE (hold desc, 'HIPAA', 999, NULL, 0, 500))
) Calc_MaxHoldDesc OVER (PARTITION BY Student.Id)
Of...
)
WHERE Calc_HippaToSortNumber = Calc_MaxHoldDesc

Rod West

Tags: Business Intelligence

Similar Questions

  • Create the view and by using the function that returns a type oracle

    Following is possible?

    A function returns an ORACLE object Type, and I want to use this feature, in my opinion, it is possible to access each field of the type once the function is executed and make a column in the view?
    create or replace TYPE SOME_INFO AS OBJECT
    ( 
      CHARGE FLOAT,
      SOME_DATE DATE,
      SOME_VAL VARCHAR(50)
    );
    
    CREATE OR REPLACE
      FUNCTION CALCULATE_INFO
        (
          p_chargeId NUMBER)
        RETURN SOME_INFO 
      AS 
      v_some_info SOME_INFO := new SOME_INFO(0, null, null);
    BEGIN
     
    -- function body populates the v_some_info
    return v_some_info;
     
    END calculate_info;
    Now, I want to use the function according to me - if the underlying query of the view follows-
     select c.*, calculate_info(c.charge_id) as someInfo from some_charge;
    How to recover someInfo.CHARGE, someInfo.some_date, someInfo.some_val? I can put them as columns in the view?

    If you use only functions that return a single value in a view?

    Thank you
    Mustapha

    Published by: Tina Giri on April 16, 2009 05:47

    How to recover someInfo.CHARGE, someInfo.some_date, someInfo.some_val?

    SQL>  create or replace type some_info
    as
       object (charge float, some_date date, some_val varchar (50));
    /
    Type created.
    
    SQL>  create or replace function calculate_info (p_chargeid number)
       return some_info
    as
       v_some_info   some_info := new some_info (0, null, null);
    begin
       -- function body populates the v_some_info
       return v_some_info;
    end calculate_info;
    /
    Function created.
    
    SQL>  select your_view.someinfo.charge,
           your_view.someinfo.some_date,
           your_view.someinfo.some_val
      from (select c.*, calculate_info (c.empno) as someinfo
              from emp c) your_view where rownum <= 3
    
    SOMEINFO.CHARGE SOMEINFO SOMEINFO.SOME_VAL
    --------------- -------- --------------------------------------------------
                  0
                  0
                  0                                                            
    
    3 rows selected.
    
  • I want the single update query without using the function.

    I want to update sells_table selling_code field with product_code date product table max.
    In the product table, there are several product_code date wise.

    I did with below charly with the use of the service, but we can do in the query what a single update
    without using the function.

    UPDATE sells_table
    SET selling_code = MAXDATEPRODUCT (ctd_vpk_product_code)
    WHERE NVL(update_product_flag,0) = 0;

    (P_product IN VARCHAR2) RETURN of HVL.maxdateproduct NUMBER FUNCTION to CREATE or REPLACE
    IS
    max_date_product VARCHAR2 (100);
    BEGIN
    BEGIN
    SELECT NVL (TRIM (product_code), 0)
    IN max_date_product
    FROM (SELECT product_code, xref_end_dt)
    PRODUCT
    WHERE TO_NUMBER (p_product) = pr.item_id
    ORDER BY xref_end_dt DESC)
    WHERE ROWNUM = 1; -He'll be back a single line - max date product code
    EXCEPTION
    WHILE OTHERS
    THEN
    RETURN 0;
    END;

    RETURN max_date_product;

    END maxdateproduct;

    Thanks in advance.

    Hello

    Something like that.

    update setlls_table st
            set selling_code =(select nvl(trim(product_code)) from
                                  (select product_code
                                          , rank() over (partition by item_id order by xref_end_dt DESC) rn
                                       from product
                                   ) pr
                                   where rn =1
                                         and pr.item_id = st.ctd_vpk_product_code
                               ) where NVL(update_product_flag,0) = 0 ;
    

    That such is not tested due to lack of sampling input.

    Concerning
    Anurag Tibrewal.

  • I have an iMac 27' 2012 with macOS Sierra and Apple Watch with watch OS 3, I can use the function "Log?" in Apple Watch

    I have an iMac 27' 2012 with macOS Sierra and Apple Watch with watch OS 3, I can use the function "Log?" in Apple Watch

    Hi John 2078 Tito.

    I understand that you have updated your iMac and Apple Watch and now you're curious about unlock your iMac using your Apple Watch. I know that it is a nice feature to be able to quickly and safely unlock your computer, so I'm happy to help you.

    This feature is available on 2013 iMacs and later versions, which means that your iMac won't be compatible. You can see more info on this feature here:
    Unlock your Mac with Apple Watch - Apple Watch user's Guide

    Thank you for using communities Support from Apple. See you soon!

  • I use Windows 10 and use the Canon SX20 IS. How to use the function of Photo stich?

    I use Windows 10 and use the Canon SX20 IS. How to use the function of Photo stich?

    Is it possible to get the procedure to use feature stich photo?

    Will be Zoombrowser EX for windows 10 wotk?

    If any expert can guide me... that will be great.

    Hi Sat17,

    Thank you for your inquiry.

    For Windows 8 and beyond, ZoomBrowser EX has been replaced by EX. ImageBrowser

    Your software you will need to updated for Windows 10.

    You can access the software for your camera by clicking here.  Once on our site, scroll down to "Drivers and downloads", then use the drop down menu to choose "8.1 Windows" or "Windows 8.1 (x 64)".»  Your camera software has not been updated for Windows 10, but for Windows 8.1 software will run on your computer.

    To update your software, click the [Select] button to the right, then click on "How to download and install" for installation instructions.

  • Color image is not displayed when we call using the function DAL (LOGO)

    Hi all

    To change a picture of the legacy of the new Image in our MRL, the legacy Image is used by a lot of Faps (sections).

    (1) if we create the new article with new Images, the process becomes complex, as we need to check all the triggers and forms associated with it.so, we plan to create a field (with the same position as picture) DAL with functions of LOGO use

    EX:

    If (#process = 1)

    LOGO ("Idea", Fieldx (), Fieldy ())

    on the other

    LOGO ("LegacyImage", Fieldx (), Fieldy ())

    End

    Return("")


    Problem: The new Image is colored but when printed (called using "DAL") that is the impression that 'Black and White')

    We tried to use 'Refresh() '.


    Kindly help me with solutions,


    Thanks in advance

    Try to use the function ChangeLogo DAL instead.

    Change a logo on a section that has the set of attributes "print in color.

    This preserve the parameter "Print in color" and the logo print in color.

    See Re: how to get the graph to print in color when it is added using script

  • Writing bug when you use the function to import .txt (Acrobat Pro DC)

    I'm trying to redact large sections of a document using the function import .txt to select phrases or expressions. It works great, except if there is - or '. In this case, Acrobat bad reads the text file, per the screenshot below. If I copy the sentence from the PDF file and add it in the same manual, it seems in good condition. If I paste the Clipboard even in a txt and then import the text, he result is bad reading and so cannot find the phrase in the document.

    Screen Shot 2016-04-17 at 9.42.45 PM.jpg

    It seems that the TXT file was done in Word and saved in Unicode format. and used quotation marks. Quotes in general are a big problem as three different characters are used for them and corresponding can be difficult; and 4 hyphen/as of the characters.

  • How can I use the function 'compare' in Acrobat Reader ms?

    I have the free version of Acrobat Reader DC.

    Now, I want to use the function "understand" but I don't know how to buy that.

    Buy only the function? Or do I have to buy the entire update?

    Thank you very much!

    This is part of the Acrobat Pro product. It cannot be added to Acrobat Reader. It is not an upgrade to Acrobat Reader - attention to not buy the upgrade, you won't be able to run it.

  • When I use the function "cut", the line of results more sharpness compared to the original files. For example, {A: "file.psd"-&gt; cultures 4x6inch, 300 dpi-&gt; B: "cropped file.psd} then the results are as described as a first step. What s the problem.

    When I use the function "cut", the line of results more sharpness compared to the original files. For example, {A: "file.psd"-> cultures 4x6inch, 300 dpi-> B: "cropped file.psd} then the results are as described as a first step. What s the problem. (Photoshop CC, windows7)

    I'm a Retoucher of photpfile have used the CS2 version for many years, and fuction 'Harvest' is an important and frequent tree tools myself. The result of the broke lines drive me annoying cause my feeling touch Sofete are all blown away. Please help me.

    I think you're talking about using the crop tool? If you're cropping with a size and resolution that involves interpolation of the image, the crop tool will use your preference for the Interpolation of the Image. By default, bicubic is automatic, which can easily result in a sharp file. Change your preference (in general) to bicubic and you shouldn't see any sharpening.

    I hope it works for your situation.

  • using the function search is not finding the words I know are in my document. Why?

    using the function search is not finding the words I know are in my document. Why?

    The fact that you see a Word does not mean that it is 'real' text. You can select the word? If so, copy and paste in another application (such as Notepad). He always look the same? If the answer to each question is, you also cannot find it by using a search.

  • CC 2015 Illustrator crashes when you use the function "save for Web".

    CC 2015 Illustrator crashes when you use the function "save for Web".

    Hello

    We have published a 19.0.1 hotfix that resolves this problem in discussion on this topic. Please apply the patch to your creative cloud application. The creative cloud application checks the update once a day, so you may see the update immediately.  If you want to force the check for an update at the beginning please logout and log back into the creative Cloud application.

    Link to 19.0.1 release notes: https://helpx.adobe.com/illustrator/kb/illustrator-cc-2015-crash-bug-fixes-19-0-1.html

    Kind regards

    Ashutosh

    The name of the Illustrator team engineering

  • Using the function PLSQL return Record Type Index of Tables in ADF

    I have a PLSQL function, a return type. My ultimate goal is to take this binary integer index Table and print it on the screen...

    CREATE OR REPLACE PACKAGE my_pkg IS
     
    TYPE t_col IS RECORD(
     
    i NUMBER,
     
    n VARCHAR2(30));
     
    TYPE t_nested_table IS TABLE OF t_col;
     
      FUNCTION return_table RETURN t_nested_table ;
    END my_pkg;


    OPTION 1:

    1) has anyone got best practices to accept plsql RECORDS returned by a function?

    Here is an example.

    http://adfpractice-Fedor.blogspot.SG/2013/01/working-with-PLSQL-procedures-in-ADF-BC.html

    But it will be a lot of work... first of all accept the results in a loop... then store in a temporary storage can be a few VO or global temporary table and then display them on the page


    OPTION 2:

    Using the functions PIPLELINED and use in the select statement.  While I can use this select statement in the SQL query to create VO... and drag and drop the VO...

    CREATE OR REPLACE PACKAGE my_pkg IS
     
    TYPE t_col IS RECORD(
     
    i NUMBER,
     
    n VARCHAR2(30));
     
    TYPE t_nested_table IS TABLE OF t_col;
     
      FUNCTION return_table RETURN t_nested_table PIPELINED;
    END my_pkg;


    select * from table(my_pkg.return_table);


    Wow... I'm so smart! .. really possible?  who is the best/possible/recommended option?

    I'm sure that will be the question most read by many who wants to use PLSQL instead of JAVA to the treatment and CHOSEN to use only to display the output of the PLSQL functions or procedures.


    Thank you

    Rahul


    Dario

    Do you mean the scope of the defined Type pkg will be finished?

    I created guy outside the pkg as 'Create Type' if it works in this case?

    Yes, level objects schema (created with "create or replace type...") can be used in java and this can work.

    I think that then the scope of this TYPE will remain until the user session passes.

    Object definitions is not worn, but have their bodies.

    So, if you instantiate the data level object type schema in a plsql function, scope of this object is this function.

    Of course, if you instantiate the object as a variable package, then life of this object is equal to the lifetime of the package (which usually equals life of session db).

    Dario

  • need help on image blob retriving of table... I need to use the function

    I have a single display field and I tried to retrieve a value using the function... The idea of using the BLOB comes from the following example...
    http://dgielis.blogspot.in/2008/07/show-blob-of-other-table-in-apex-form.html

    I created the following function... has only function display.
    "return ' < img src =" "|" APEX_UTIL. GET_BLOB_FILE_SRC('P375_PICTURE',1204,,'inline') | '" />';

    but the output is undesirable character
    The output is the following
    < img src = "" apex_util.get_blob_file? a = 231 & s = 16387884076007 & p = 375 & d = 26249204291254605 & i = 26247831247254566 & p_pk1 = 1204 & p_pk2 = & p_ck = C226897F204BFA329F601AF2ED72ECDA & p_content_disposition = inline "/ >"

    Using apex 4.2 db 11g release 2 xe
    1204 here are a few magazine_id
    Here's my blob table structure
    xxx_picture
    xxx_no number (10),
    BLOB of photo
    picture_filename
    picture_mimetype
    image_last_update
    I am able to recover the data via interactivereport but I will lke to recover their data that show only the BLOB field

    Can someone please guide. . I could hurt
    Thank you

    Published by: zycoz100 on April 28, 2013 01:05

    zycoz100 wrote:
    I have a single display field and I tried to retrieve a value using the function... The idea of using the BLOB comes from the following example...
    http://dgielis.blogspot.in/2008/07/show-blob-of-other-table-in-apex-form.html

    I created the following function... has only function display.
    return '';

    but the output is undesirable character
    The output is the following

    To get a displayed item to render in HTML, in the definition section Security value escape special characters notitem.

    For a column of the report, ensure that the column attribute text to display as report is report Standard column rather than the default display text (escape special characters).

    However in the APEX 4.x, using an element in the Image display and support declarative BLOB is preferable to these manual methods. Images can be formatted using the HTML attributes of the element form of property, or via CSS element.

  • I want to rename and move files from a shoot 5 d. I would like to use the functionality of the increment to count, but since I have to get out of each file to the following file, it starts again at 1. What is the best way to do it?

    I want to rename and move files from a shoot 5 d on a new drive. I would like to use the functionality of the increment to count, but since I have to get out of each file to the following file, it starts again at 1. What is the best way to do it?

    HI -.

    As a prelude to 2014.0, we have added a feature allowing you to choose what number to start the increment of.  Look in the section ingest Rename dialog and change your preset. When you click the button, you should see the option "Custom Auto Increment". This will allow you to choose what number to start on.  We've also added a few newspapers to try to remember where let prelude last successfully interfere the operation by using this option. So, in theory, to remember the number for you. But if it isn't (maybe you want multiple kickoff ingested at the same time) you can always manually set the number to start with.

    Check that out and let me know how it works for you.

    Kind regards

    Michael

  • Using the function to retrieve several data

    using the function recover data of the hre_date and name of entry where are employee_id = 100. kindly give a query in PLSQL

    Padma... wrote:
    Hello

    create or replace function f1 (a number, b out varchar2) return date
    is
    c the date;
    Start
    Select last_name, hire_date b, c of the employees where employee_id = a;
    return c;
    end;
    /
    declare
    name varchar2 (30);
    Start
    dbms_output.put_line (f1(100, name));
    dbms_output.put_line (Name);
    end;

    Thank you
    Padma...

    Agree with Marwim, using OUT parameters is very bad practice.

    Something would be more appropriate...

    SQL> create or replace function get_emp(empno in number) return sys_refcursor is
      2    rc sys_refcursor;
      3  begin
      4    open rc for 'select hiredate, ename from emp where empno = :1' using empno;
      5    return rc;
      6  end;
      7  /
    
    Function created.
    
    SQL> var rc refcursor;
    SQL> exec :rc := get_emp(7788);
    
    PL/SQL procedure successfully completed.
    
    SQL> print rc
    
    HIREDATE             ENAME
    -------------------- ----------
    19-APR-1987 00:00:00 SCOTT
    
    SQL>
    

    If the customer requires a Ref cursor returned with data, otherwise a registration type / adapted collection could be returned and the integrated data to the that, although in general the collection of data in memory and the passage on the procedures is not the most ideal because it takes up resources such as memory of the PGA.
    Without special requirements, it is impossible to give a precise answer.

Maybe you are looking for

  • Bookmarks and Notes in iBooks synchronize correctly or not at all.

    My problems with iBooks began with the installation of Mac OS X, 10.11.4. Is no longer my notes and bookmarks sync through my iBooks running legacy. Since this update was made, iBooks notes are not synchronized, meaning that highlights or notes taken

  • Yoga 2 Pro - cursor flashes when moving on some programs

    I have a Yoga 2 Pro with Windows 10. Some programs (for example Thunderbird, LibreOffice), the cursor flashes when moving on the program window. I made sure my screen and touchpad drivers are up to date as well as the BIOS of my laptop. What else cou

  • Problems with HP 722C printer

    Original title: hp.printer.722C.DOWNLAD driver does not ale print paper The other post: IMAGE FROM PAPER COPY LODE NOTING HP PRINTER 722C JETINK DOES NOT

  • How to close share it with others that my conversations on MSN live?

    I can't find how to disable share them with others who maybe have me on their contact lists my MSN live converstions. Of course it is the default.

  • Row format and alignment.

    I displays a line consisting of three pieces of information: (1) an icon showing point State, (2) a description of string for the article, and (3) a string of 2-3. I would like to the 1st field to be aligned to the left in the row, the 3rd field to b