Function Sinc data fit

Dear community,

Recently, I wrote a program that corresponds to a Gaussian function to certain data of intensity that I shot a picture of a fluorescent NANOPARTICLE. Here's an overview:

My program would be much more useful if I could adapt the data to a Sinc function instead of a Gaussian. Could someone please give me a few points in the right direction on how to do it? I'm very new to LabVIEW, so maybe I need a little more help than just what VI to use. I would appreciate your help.

Please note: I need to adapt to all data, not just half.

I use version 9.0.1 with Windows 7 64-bit operating system.

My program is attached below.

Thank you!

-Patrick

Here is a quick attempt to fit all 2D data. Seems to work very well. (LabVIEW 9.0)

  1. Run the VI. It will start the installation immediately.

  2. Change the settings of simulation at any time to see the result simulated using the template (at the bottom right)

  3. Once the editing is complete, you can drag the yellow slider to inspect the data and along a vertical line.

The attached zip file contains the toplevel VI VI VI model and image. To a new folder and load and run the VI toplevel.

Since you have little data, it probably helps to fit all the data instead of a single line. Let me know if something is not clear. To be honest, I don't think that a square sinc is the correct model. There is no real wings in your data!

Tags: NI Software

Similar Questions

  • Is function like the function of date and time picker in the ICB 8.5?

    I need the function as "date and time picker control" used in activeX, but my operating system (windows 7 Bits without office software) is not the «Microsoft date controller» and time picker I am looking article in the internet which mention this register the MSComctl2.ocx in the windows\system32, but he could not operator in my operating system (it's not allow to save the controller). Help me, please.

    Already, I discovered that the problem on the service of DTP in the 64-bit Windows 7 could not used. Because, the DTP is 32 bits, it should use the administrator to register the 'mscomct2.ocx file' which must be replace in the % windows/SysWOW64 and used the 'mscomct2.ocx regsvr32.exe"in console windows.

  • Overload function "value data" problem on DataGrid Renderer button

    Hi all, I hope it is something simple.

    I have a class that extends the mx.controls.Button mx.core.IDataRenderer and implements.  I need to set the icon of the button whenever the Data property has the value of the data grid.  My problem is that my set/get overloaded function of data are never called (I reinforced with the debugging code).  Instead the set/get in Container.as functions (3.4 the Flex SDK kit) called.

    Here's the Basic code:

    exportButtonRenderer.as
    package controls
    {
    import flash.events.Event;
    import flash.events.MouseEvent;

    Import mx.controls.Button;
    Import mx.core.IDataRenderer;
    Import mx.controls.dataGridClasses.DataGridListData;
    Import mx.controls.listClasses.BaseListData;
    Import mx.events.FlexEvent;
    Import mx.controls.Alert;

    Import model.descriptors.compDescriptor;
    Import events.exportClickedEvent;

    public class exportButtonRenderer extends button implements IDataRenderer
    {
    Embed your icons
    [(Embed(source='/assets/icons/export.png')]
    [Bindable]
    public static var imageExport: Class;

    [(Embed(source='/assets/icons/blank.png')]
    [Bindable]
    public static var imageBlank: Class;

    public void exportButtonRenderer()
    {
    Super();
    }

    private var _listData:DataGridListData;
    override public function get listData (): BaseListData
    {
    Return _listData;
    }

    override public function set listData(value:BaseListData):void
    {
    _listData = DataGridListData (value);
    }

    private var _data:Object;
    public override function get data (): Object
    {
    return _data;
    }

    override public function set data(value:Object):void
    {
    _data = value;
    }

    override the clickHandler(event:MouseEvent):void function
    {

    super.clickHandler (event);
    }
    }
    }

    Now I know that I am using the Flexlib TreeGrid and not a standard DataGrid but when I trace through all the code all code firing the set/get functions is in any case the DataGrid control.

    Here is the my def grid in my main application mxml:

    Header 1
    < flexlib:TreeGrid
    ID = "MKTXGrid".
    dragEnabled = 'false' sortableColumns = 'false' showRoot = "false".
    (disclosureClosedIcon="@Embed(source='/assets/icons/arrow_right.png')".
    (disclosureOpenIcon="@Embed(source='/assets/icons/arrow_down.png')".
    (folderOpenIcon="@Embed(source='/assets/icons/psd.png')".
    (folderClosedIcon="@Embed(source='/assets/icons/psd.png')".
    Click = "MKTXGrid_clickHandler (Event)" "
    doubleClickEnabled = "true" doubleClick = "MKTXGrid_doubleClickHandler (event)" left = "0" right = "0" top = low "0" = "16" > "

    < flexlib:columns >
    < flexlib:TreeGridColumn dataField = "Name" headerText = "Name" minWidth = "200" width = "200" editable = "true" / >
    < mx:DataGridColumn dataField = 'ExportName"headerText ="Export Name"/ >
    < mx:DataGridColumn dataField = "Export" headerText = "Export" width = "50" minWidth = "20" resizable = "false" >
    < mx:itemRenderer >
    < mx:Component >
    < mx:Box horizontalAlign = "center" width = "100%" verticalScrollPolicy = "off" horizontalScrollPolicy = "off" >

    (< contrôles: exportButtonRenderer label = «Exporter» icon="@Embed(source='assets/icons/export.png')" width = "12" height = "12" useHandCursor = "true" >
    < controls: Click >
    <! [CDATA]
    Import events.exportClickedEvent;
    var e:exportClickedEvent = new exportClickedEvent();
    e.itemData = data;
    dispatchEvent (e);
    []] >
    < / controls: Click >
    < / controls: exportButtonRenderer >
    < / mx:Box >
    < / mx:Component >
    < / mx:itemRenderer >
    < / mx:DataGridColumn >
    < / flexlib:columns >
    < / flexlib:TreeGrid >


    Nothing too special happens.

    I know it can be done, I've seen examples in the SDK:

    http://opensource.Adobe.com/svn/opensource/Durango/trunk/ExternalFlexTools/com/dougmccune/ containers/accordionClasses/AccordionHeader.as

    Either incidentally, I reinforced with the code in the TreeGridItemRenderer class in Flexlib which works correctly and the class def starts like this:

    TreeGridItemRenderer.as
    import flash.display.DisplayObject;
    to import flash.display.InteractiveObject;
    import flash.display.Shape;
    import flash.display.Sprite;
    import flash.events.Event;
    import flash.events.MouseEvent;
    to import flash.geom.Point;
    import flash.geom.Rectangle;

    Import flexlib.controls.TreeGrid;

    Import mx.controls.Image;
    Import mx.controls.dataGridClasses.DataGridListData;
    Import mx.controls.listClasses.BaseListData;
    Import mx.controls.listClasses.IDropInListItemRenderer;
    Import mx.controls.listClasses.IListItemRenderer;
    Import mx.core.IDataRenderer;
    Import mx.core.IFlexDisplayObject;
    Import mx.core.IToolTip;
    Import mx.core.SpriteAsset;
    Import mx.core.UIComponent;
    Import mx.core.UITextField;
    Import mx.events.FlexEvent;
    Import mx.events.ToolTipEvent;
    Import mx.events.TreeEvent;
    Import mx.managers.ILayoutManagerClient;
    Import mx.styles.IStyleClient;

    SerializableAttribute public class TreeGridItemRenderer extends UIComponent
    implements IDataRenderer,
    IDropInListItemRenderer,
    ILayoutManagerClient,
    IListItemRenderer
    {
    ...

    Any help would be great!

    It's because you put your component in a box.  The DataGrid control is affecting .data property of the box and without code is on your component.  You shouldn't really need box.  You can override updateDisplayList to Center your button instead.

    Alex Harui

    Flex SDK Developer

    Adobe Systems Inc..

    Blog: http://blogs.adobe.com/aharui

  • How to use the TRUNC function with dates in the expression builder in OBIEE.

    Hello
    How to use the TRUNC function with dates in the expression builder in OBIEE.
    TRUNC (SYSDATE, 'MM') returns 1 July 2010"where sysdate is July 15, 2010 ' in SQL. I need to use the same in the expression builder in the logical layer mdb column.


    Thanks in advance

    Use it instead:
    TIMESTAMPADD (SQL_TSI_DAY, (DAYOFMONTH (CURRENT_DATE) *-1) + 1, CURRENT_DATE)

  • Functional and data differences between W_GL_BALANCE_F and W_GL_OTHER_F

    Hello:
    Some explain what are the functional differences and source of data between W_GL_BALANCE_F and W_GL_OTHER_F? The two seem to group by GROUP_ACCOUNT_NUM.

    Thank you.

    It is not possible; all transactions in GL other eventually GL balance.
    Both tables have essentially the same data but different grains. Two main differences:

    -Other GL have transaction log; GL balance make them summarized at the account level.
    -Other GL is really additive since its transactions of individual entries. that is, you can just sum() any number of transactions and double counting used a trx; Balance of GL is a table of monthly snapshot. that is, it provides account balance for all accounts for the end of each month, so you can never add two snapshots.

  • Connection (or not) the entrance to 'type' of function 'variant data?

    I noticed (again i) assumed that when I connect an output "Data Variant" connector of a VI or a known type indicator, the thread automatically adopt the correct type. Exports means that I don't have to connect a wire to the 'Type' of the 'variant data?

    There are many similar situations where this shortcut does not work. For example, the variant of wiring data function for a bundle by node Name will automatically select the target type of the conversion. I suppose that the index case is a very specific optimization, and this isn't a generally available shortcut.

  • Error 91 - try to use the variant of the function of data

    I'm running a problem when you try to use variations in my application. I have a setup of State machine that a State creates a list of tasks (cluster of tables), and then converts it to the Variant. The variant is fed into a shift register that allows me to access the list of tasks of a different State.

    The problem comes when I try to use the variant of the function Data. I right click on the task cluster to create a constant and then wire to the TYPE of the variant of the function Data. I wire the variant of cluster of task to the terminal of the VARIANT. When I run the VI, I get error 91: or the possible reasons: LabVIEW: the variant data type is not compatible with the data type of wired for the input type. ».

    How can I get this error if the type that I have connected to a Terminal TYPE of the Variant Data terminal is a constant created from the exact type created a variant of?

    Section of the machine of the State where I wire the cluster variant:

    Section of the machine of the State where I use the data out of the cluster variant:

    The constant wire to the terminal of data TYPE variant was created from the cluster that is connected to the Variant type data. I don't understand how there is a type mismatch?

    Is there another State between these two?  I notice you have some tunnels 'Use default if unwired' coming out of the structure of your business.  First of all, clear on the tunnels.  Second, in cases where you do not only affect the data, the data directly from the tunnel entrance in the tunnel exit of the wire.  I recommend using the tunnels linked to make it even easier on yourself.

    With the default tunnels being output, your variant coming could really be empty, so the conversion fails.

  • On the function of Date selection?

    Hello

    I've been looking for a while now, and I've not found anything. I have a DateField and I want to call a function when the user changes the date in this field (I want to update certain content in an ObjectChoiceField). Is there a good way to do this?

    Thank you

    Ben

    You can add a fieldchangelistener field.

  • function with dates to compare?

    Hi all

    in my test examples, which must extend, problem start by employees who start working

    previous year (2014, 2013...) more months then sys - 10 month and day to start working more then 28 large

    all other dates are working fine.

    At this point I've seen like this:

    SELECT SUM ((extrait (an (SYSDATE))-extract (year DATE_OF_BEGIN_WORK))) as the year.

    SUM (abs (extract(month from SYSDATE)-extract(month from DATE_OF_BEGIN_WORK))) as month,

    SUM (abs (extract(day from SYSDATE)-extract(day from DATE_OF_BEGIN_WORK))) as day, group employ_id employ_id table_a where active = 1

    are there solutions for creating features that compare the dates in the table:

    table_a have colum DATE_OF_BEGIN_WORK compare with sysdate

    case 1:

    months from the date of start to work > sysdate current months and days of the date to start work > current sysdate day and date of start working < sysdate year then

    (extract (YEAR sysdate)-extract (YEAR DATE_OF_BEGIN_WORK));

    (Excerpt extracted from (DATE_OF_BEGIN_WORK months) - (sysdate month));

    (extract (DATE_OF_BEGIN_WORK days) - excerpt (sysdate days));

    case 2:

    months from the date of starting work < sysdate current months and the days of the date to start work < current sysdate day and date of start working < sysdate year then

    (extract (YEAR sysdate)-extract (YEAR DATE_OF_BEGIN_WORK));

    ((sysdate sysdate months) extract - extract (DATE_OF_BEGIN_WORK month));

    ((sysdate day) extract - extract (DATE_OF_BEGIN_WORK days)) + 1;

    case 3:

    months from the date of start to work > sysdate current months and days of the date to start work > current sysdate day and date of start working < sysdate year then

    (extract (YEAR sysdate)-extract (YEAR DATE_OF_BEGIN_WORK))-1;

    ((extract(month from DATE_OF_BEGIN_WORK)-12) - extract (DATE_OF_BEGIN_WORK month));

    (extract (DATE_OF_BEGIN_WORK days) - EXTRACTED (LAST_DAY DATE (DATE_OF_BEGIN_WORK)) + extract (sysdate days)) + 1;

    no idea how to solve this problem with the functions will be very useful

    concerning

    Gordan

    It seems you are trying to re - invent most of date mathematics that Oracle has obtained already integrated into it.  You'll just put in trouble, especially when there are leap years etc.

    How about something like this?

    SQL > with (id, dt) t (select 1, to_date('02/06/2010','MM/DD/YYYY') of all the double union)
    2 Select 2, to_date('11/29/2001','MM/DD/YYYY') of all the double union
    3 select 3, to_date('02/06/2011','MM/DD/YYYY') of all the double union
    4. Select option 4, double to_date('10/10/2011','MM/DD/YYYY')
    5                    )
    6  --
    7. end of test data
    8  --
    9 select id, dt
    10, floor (months_between(sysdate,dt)/12) years
    11, floor (mod (months_between (sysdate, dt), 12)) months
    12 - day be ambiguous because of the number of days in a different month
    13. you could design your own algorithm to give the desired results, but it is a good approximation
    14, floor (sysdate-(add_months (dt, floor (months_between (sysdate, dt))) as dys
    15 t
    16.
    ID DT YEARS MONTHS DYS
    ---------- ----------- ---------- ---------- ----------
    1-6 FEBRUARY 2010 5 8 22
    2 29 NOVEMBER 2001 13 10 29
    3-6 FEBRUARY 2011 4 8 22


    4-10 OCTOBER 2011 4 0 18

    4 selected lines.

  • Get the custom IdocScript function contributor data file

    Hello

    I have a requirement to retrieve a number of elements of a given contributor data file. The problem is, I don't know how to retrieve the XML code inside a custom component of IdocScript.

    Given the content of the data contributor file ID, is there an easy way to get the XML file, or do I need to use with a service call?

    Thank you!

    If it's a Java component, why not just get the direct file system XML file? The demand function, you could have a file path in the binder... If not, use the IdcFileDescriptor object:

    https://groups.Yahoo.com/neo/groups/intradoc_users/conversations/topics/25937

  • PL/SQL FUNCTION: Passage date &amp; string as parameter

    Hello

    I have a situation where I have to convert the ISO date format Date [YYYY-MM - DDTHH24:MI]

    Is function def. : FN_ISO (IN_DATE Varchar2, Varchar2 IN_TIME)

    Front-end for the date and time, I can enter in 3 different ways.

    Input 1. what date / time is completely known

    Date: 5 April 2015

    Time: 23:56

    Input 2. When the date is known, but the time is unclear (the hour is UNK)

    Date: 5 April 2015

    Time: UNK:56

    Entry 3. When the date and time are unknown (month is UNK)

    Date: 05-UNK-2015

    Time: UNK:56

    Here, I am facing the problem with the Time parameter. Please find below scenarios:

    Scenario 1: If the time is complete (as input 1) then I'll pass the data type Date in 2nd parameter (5 April 2015, which contains the time internally)

    Scenario 2: If the time is incomplete or partially known (as input 2) then I'll pass the Varchar2 data type in 2nd parameter (UNK:56 as string)

    Problem statement:

    Consider scenario 1; If date & time is over so I'm passing the data type Date (April 5, 2015 23:56) Varchar2, then time will be 5 April 2015 00:00, however I need to get the time (23:56)

    Note:

    -I can't use the overload of functions.

    -I can not change the way call function which I now call.

    -I can't do second parameter date because in scenario 2 I have to pass the string "UNK:56".

    Please suggest me, how I can address the issue. Your help would be very appreciated.

    Thanks in advance!

    create or replace function fun_iso (IN_DATE VARCHAR, IN_TIME VARCHAR2 )  return varchar2
    is
    V_ISO varchar2(20);
    begin
    SELECT 
        (case when 
                   regexp_like(IN_DATE,'(UNK|\d+)/(UNK|\d+)/(UNK|\d+)') THEN 
                   REGEXP_REPLACE((REGEXP_REPLACE(translate(in_date||' '||in_time,'/ ','-T'),'UNK|NUL','-')),'(:|-|T)+$')
                   WHEN regexp_like(IN_DATE,'\d+-(\w+|\d+)-(\d+)') then
                   REGEXP_REPLACE((REGEXP_REPLACE(translate(TO_char(to_date(IN_DATE,'DD-MM-YY'),'YYYY-MM-DD')||' '||
          /*for scenario 1*/    (CASE 
                             WHEN regexp_like(IN_TIME,'(\d+)-(\w+)-(\d+)') 
                             THEN DECODE(TO_CHAR((IN_TIME),'HH24:MI:SS'),'00:00:00', NULL,TO_CHAR(IN_TIME,'HH24:MI:SS'))  /* Here i need time if i will pass 05-Apr-2015*/
                             ELSE NULL
                                  END) 
                   ,'/ ','-T'),'UNK|NUL','-')),'(:|-|T)+$')
                   else '0'
         END)
         INTO V_ISO from dual;
         RETURN V_ISO;     
    end;
    /
    
    /* Use below table : line 35 is scenario 1 */
    
    select a.*, fun_iso(IN_DATE, IN_TIME)
    FROM 
    (
    (SELECT '2015-01-15T22:29:59 ' ISO_DATE_TIME, '2015/05/05' IN_DATE , '22:29:59' IN_TIME FROM DUAL UNION
    SELECT ' ' ISO_DATE_TIME, 'UNK/UNK/UNK' IN_DATE , '22:29:NUL' IN_TIME FROM DUAL UNION
    SELECT ' ' ISO_DATE_TIME, '01-Jan-15' IN_DATE , '22:UNK:NUL' IN_TIME FROM DUAL UNION
    SELECT ' ' ISO_DATE_TIME, '01-Jan-1948' IN_DATE , '22:29:NUL' IN_TIME FROM DUAL UNION
    SELECT ' ' ISO_DATE_TIME, '01-05-15' IN_DATE , '22:29:NUL' IN_TIME FROM DUAL UNION
    SELECT ' ' ISO_DATE_TIME, '25-05-2015' IN_DATE , '22:29:NUL' IN_TIME FROM DUAL UNION
    --SELECT ' ' ISO_DATE_TIME, '25-05-2015' IN_DATE , TO_CHAR(TO_DATE('01-AUG-14 23:56:00','DD-Mon-YY HH24:MI:SS')) IN_TIME FROM DUAL UNION
    SELECT '2009' ISO_DATE_TIME, '2009/UNK/UNK' IN_DATE , 'UNK:UNK:NUL' IN_TIME FROM DUAL UNION
    SELECT '2009---25' ISO_DATE_TIME, '2009/UNK/25' IN_DATE , 'UNK:UNK:NUL' IN_TIME FROM DUAL UNION
    SELECT '--03-25' ISO_DATE_TIME, 'UNK/03/25' IN_DATE , 'UNK:UNK:NUL' IN_TIME FROM DUAL UNION
    SELECT '--03--T-:15' ISO_DATE_TIME, 'UNK/03/UNK' IN_DATE , 'UNK:15:NUL' IN_TIME FROM DUAL UNION
    SELECT '2009-03 ' ISO_DATE_TIME, '2009/03/UNK' IN_DATE , 'UNK:UNK:NUL' IN_TIME FROM DUAL UNION
    SELECT '2009-03--T12' ISO_DATE_TIME, '2009/03/UNK' IN_DATE , '12:UNK:NUL' IN_TIME FROM DUAL )
     ) a;
    

    Hello

    Here's one way:

    FUNCTION to CREATE or REPLACE fun_iso

    (in_date in VARCHAR2

    in_time IN VARCHAR2

    )

    RETURN VARCHAR2

    DETERMINISTIC

    IS

    month_name VARCHAR2 (51): = ' JAN Feb MAR Apr MAY June July Aug SEP OCT NOV DEC UNK;

    month_num VARCHAR2 (50): = '01 02 03 04 05 06 07 08 09 10 11 12-';

    BEGIN

    RETURN SUBSTR (in_date,-4)

    || '-'

    || SUBSTR (month_num

    INSTR (month_name

    , SUBSTR (in_date, 4, 3)

    )

    2

    )

    || '-'

    || SUBSTR (in_date, 1, 2)

    || ' T '

    || CASE

    WHEN SUBSTR (in_time, 1, 3) = "UNK".

    THEN '-'

    Of OTHER SUBSTR (in_time, 1, 2)

    END

    || '-'

    || SUBSTR (in_time-2)

    ;

    END fun_iso;

    /

    If your needs are more complex, you can do this drill several assignments, where you build a string a little at a time, and RETURN this string at the end.

  • function round date

    cant that I round the date like that?
    or only sysdate can be rounded or if the date is stored in a variable can only be rounded

    Select double round('21-feb-1999','mon');

    Hello

    987018 wrote:
    cant that I round the date like that?
    or only sysdate can be rounded

    No, there is nothing in particular SYSDATE. Any DATE may be rounded off.

    or if the date is stored in a variable can only be rounded

    No, it does not matter if the DATE is a column, a literal, a variable, the result of a function, or any other form of expression, just as long as it's a DATE.

    Select double round('21-feb-1999','mon');

    The problem is that 21 February 1999 "is not a DATE; It's a VARCHAR2.

    TO_DATE allows to convert a DATE VARCHAR2:

    SELECT  ROUND ( TO_DATE ('21-feb-1999', 'dd-mon-yyyy')
                  , 'mon'
                  )       AS r
    FROM    dual;
    

    or use a literal DATE:

    SELECT  ROUND ( DATE  '1999-02-21'
                  , 'mon'
                  )       AS r
    FROM    dual;
    
  • Problem with analytical function for date

    Hi all

    ORCL worm:
    Oracle Database 11 g Enterprise Edition Release 11.2.0.2.0 - 64 bit Production
    PL/SQL Release 11.2.0.2.0 - Production
    "CORE 11.2.0.2.0 Production."
    AMT for Linux: Version 11.2.0.2.0 - Production
    NLSRTL Version 11.2.0.2.0 - Production

    I have a problem with the analtical for the date function. I'm trying to group records based on timestamp, but I'm failing to do.
    Could you please help me find where I'm missing.
    This is the subquery. No issue with this. I'm just posting it for reference. 
    select sum(disclosed_cost_allocation.to_be_paid_amt) amt,
        substr(reference_data.ref_code,4,10) cd,
        to_char(external_order_status.status_updated_tmstp, 'DD-MON-YYYY HH24:MI:SS') tmstp,
        DISCLOSED_CLOSING_COST.DISCLOSED_CLOSING_COST_ID id
      FROM Deal.Fee_Mapping_Definition ,
        Deal.Fee_Index_Definition ,
        Deal.Fee_Closing_Cost_Item,
        Deal.Closing_Cost,
        Deal.Document_Generation_Request,
        deal.PRODUCT_REQUEST,
        deal.External_Order_Request,
        deal.External_Order_Status,
        deal. DISCLOSED_CLOSING_COST,
        deal.DISCLOSED_COST_ALLOCATION,
        deal.reference_data
      WHERE Fee_Mapping_Definition.Fee_Code                    = Fee_Index_Definition.Fee_Code
      AND Fee_Index_Definition.Fee_Index_Definition_Id         = Fee_Closing_Cost_Item.Fee_Index_Definition_Id
      AND Fee_Closing_Cost_Item.Closing_Cost_Id                = Closing_Cost.Closing_Cost_Id
      AND CLOSING_COST.PRODUCT_REQUEST_ID                      = Document_Generation_Request.Product_Request_Id
      AND closing_cost.product_request_id                      = product_request.product_request_id
      AND Product_Request.Deal_Id                              = External_Order_Request.Deal_Id
      AND external_order_request.external_order_request_id     = external_order_status.external_order_request_id
      AND external_order_request.external_order_request_id     = disclosed_closing_cost.external_order_request_id
      AND DISCLOSED_CLOSING_COST. DISCLOSED_CLOSING_COST_ID    = DISCLOSED_COST_ALLOCATION.DISCLOSED_CLOSING_COST_ID
      AND Fee_Index_Definition.Fee_Index_Definition_Id         = Disclosed_Closing_Cost.Fee_Index_Definition_Id
      AND Fee_Mapping_Definition.Document_Line_Series_Ref_Id   = Reference_Data.Reference_Data_Id
      AND Document_Generation_Request.Document_Package_Ref_Id IN (7392 ,2209 )
      AND External_Order_Status.Order_Status_Txt               = ('GenerationCompleted')
      AND Fee_Mapping_Definition.Document_Line_Series_Ref_Id  IN ( 7789, 7788,7596 )
      AND FEE_MAPPING_DEFINITION.DOCUMENT_TYPE_REF_ID          = 1099
      AND Document_Generation_Request.Product_Request_Id      IN
        (SELECT PRODUCT_REQUEST.PRODUCT_REQUEST_id
        FROM Deal.Disclosed_Cost_Allocation,
          Deal.Disclosed_Closing_Cost,
          DEAL.External_Order_Request,
          DEAL.PRODUCT_REQUEST,
          Deal.Scenario
        WHERE Disclosed_Cost_Allocation.Disclosed_Closing_Cost_Id = Disclosed_Closing_Cost.Disclosed_Closing_Cost_Id
        AND Disclosed_Closing_Cost.External_Order_Request_Id      = External_Order_Request.External_Order_Request_Id
        AND External_Order_Request.Deal_Id                        = Product_Request.Deal_Id
        AND product_request.scenario_id                           = scenario.scenario_id
        AND SCENARIO.SCENARIO_STATUS_TYPE_REF_ID                  = 7206
        AND product_request.servicing_loan_acct_num              IS NOT NULL
        AND product_request.servicing_loan_acct_num               = 0017498379
          --AND Disclosed_Cost_Allocation.Disclosed_Cost_Allocation_Id = 5095263
        )
      GROUP BY DISCLOSED_CLOSING_COST.DISCLOSED_CLOSING_COST_ID,
        External_Order_Status.Status_Updated_Tmstp,
        Reference_Data.Ref_Code,
        disclosed_cost_allocation.to_be_paid_amt
      order by 3 desc,
        1 DESC;
    
    Result:
    2000     1304-1399     28-JUL-2012 19:49:47     6880959
    312     1302     28-JUL-2012 19:49:47     6880958
    76     1303     28-JUL-2012 19:49:47     6880957
    2000     1304-1399     28-JUL-2012 18:02:16     6880539
    312     1302     28-JUL-2012 18:02:16     6880538
    76     1303     28-JUL-2012 18:02:16     6880537
    
    
    But, when I try to group the timestamp using analytical function,
    
    
    select amt 
            ,cd 
            ,rank() over(partition by tmstp order by tmstp desc) rn 
    from 
    (select sum(disclosed_cost_allocation.to_be_paid_amt) amt,
        substr(reference_data.ref_code,4,10) cd,
        to_char(external_order_status.status_updated_tmstp, 'DD-MON-YYYY HH24:MI:SS') tmstp,
        DISCLOSED_CLOSING_COST.DISCLOSED_CLOSING_COST_ID id
      FROM Deal.Fee_Mapping_Definition ,
        Deal.Fee_Index_Definition ,
        Deal.Fee_Closing_Cost_Item,
        Deal.Closing_Cost,
        Deal.Document_Generation_Request,
        deal.PRODUCT_REQUEST,
        deal.External_Order_Request,
        deal.External_Order_Status,
        deal. DISCLOSED_CLOSING_COST,
        deal.DISCLOSED_COST_ALLOCATION,
        deal.reference_data
      WHERE Fee_Mapping_Definition.Fee_Code                    = Fee_Index_Definition.Fee_Code
      AND Fee_Index_Definition.Fee_Index_Definition_Id         = Fee_Closing_Cost_Item.Fee_Index_Definition_Id
      AND Fee_Closing_Cost_Item.Closing_Cost_Id                = Closing_Cost.Closing_Cost_Id
      AND CLOSING_COST.PRODUCT_REQUEST_ID                      = Document_Generation_Request.Product_Request_Id
      AND closing_cost.product_request_id                      = product_request.product_request_id
      AND Product_Request.Deal_Id                              = External_Order_Request.Deal_Id
      AND external_order_request.external_order_request_id     = external_order_status.external_order_request_id
      AND external_order_request.external_order_request_id     = disclosed_closing_cost.external_order_request_id
      AND DISCLOSED_CLOSING_COST. DISCLOSED_CLOSING_COST_ID    = DISCLOSED_COST_ALLOCATION.DISCLOSED_CLOSING_COST_ID
      AND Fee_Index_Definition.Fee_Index_Definition_Id         = Disclosed_Closing_Cost.Fee_Index_Definition_Id
      AND Fee_Mapping_Definition.Document_Line_Series_Ref_Id   = Reference_Data.Reference_Data_Id
      AND Document_Generation_Request.Document_Package_Ref_Id IN (7392 ,2209 )
      AND External_Order_Status.Order_Status_Txt               = ('GenerationCompleted')
      AND Fee_Mapping_Definition.Document_Line_Series_Ref_Id  IN ( 7789, 7788,7596 )
      AND FEE_MAPPING_DEFINITION.DOCUMENT_TYPE_REF_ID          = 1099
      AND Document_Generation_Request.Product_Request_Id      IN
        (SELECT PRODUCT_REQUEST.PRODUCT_REQUEST_id
        FROM Deal.Disclosed_Cost_Allocation,
          Deal.Disclosed_Closing_Cost,
          DEAL.External_Order_Request,
          DEAL.PRODUCT_REQUEST,
          Deal.Scenario
        WHERE Disclosed_Cost_Allocation.Disclosed_Closing_Cost_Id = Disclosed_Closing_Cost.Disclosed_Closing_Cost_Id
        AND Disclosed_Closing_Cost.External_Order_Request_Id      = External_Order_Request.External_Order_Request_Id
        AND External_Order_Request.Deal_Id                        = Product_Request.Deal_Id
        AND product_request.scenario_id                           = scenario.scenario_id
        AND SCENARIO.SCENARIO_STATUS_TYPE_REF_ID                  = 7206
        AND product_request.servicing_loan_acct_num              IS NOT NULL
        AND product_request.servicing_loan_acct_num               = 0017498379
          --AND Disclosed_Cost_Allocation.Disclosed_Cost_Allocation_Id = 5095263
        )
      GROUP BY DISCLOSED_CLOSING_COST.DISCLOSED_CLOSING_COST_ID,
        External_Order_Status.Status_Updated_Tmstp,
        Reference_Data.Ref_Code,
        disclosed_cost_allocation.to_be_paid_amt
      order by 3 desc,
        1 DESC);
    
    Result:
    312     1302            1
    2000     1304-1399     1
    76     1303            1
    312     1302            1
    2000     1304-1399     1
    76     1303            1 
    
    
    Required output:
    312     1302            1
    2000     1304-1399     1
    76     1303            1
    312     1302            2
    2000     1304-1399     2
    76     1303            2
    THX
    Rod.

    Hey, Rod,

    My guess is that you want:

    , dense_rank () over (order by  tmstp  desc)  AS rn 
    

    RANK means you'll jump numbers when there is a link. For example, if all 3 rows have the exact same last tmstp, all 3 rows would be assigned number 1, GRADE would assign 4 to the next line, but DENSE_RANK attributes 2.

    "PARTITION x" means that you are looking for a separate series of numbers (starting with 1) for each value of x. If you want just a series of numbers for the entire result set, then do not use a PARTITION BY clause at all. (PARTITION BY is never required.)
    Maybe you want to PARTITIONNER IN cd. I can't do it without some examples of data, as well as an explanation of why you want the results of these data.
    You certainly don't want to PARTITION you BY the same expression ORDER BY; It simply means that all the lines are tied for #1.

    I hope that answers your question.
    If not, post a small example data (CREATE TABLE and only relevant columns, INSERT statements) for all of the tables involved and also publish outcomes from these data.
    Explain, using specific examples, how you get these results from these data.
    Simplify the problem as much as possible.
    Always tell what version of Oracle you are using.
    See the FAQ forum {message identifier: = 9360002}

    Published by: Frank Kulash, August 1, 2012 13:20

  • loss of functionality since the last update

    Since the last update of Mozilla a few days ago (Mac) I noticed at least 2 items that I used to use regularly lost features:

    1. used to be able to rearrange bookmarks by drag-and - drop (bookmarks-> show all bookmarks). Is no longer able to rearrange except manually and paste laboriously

    2. used to be able to click on download arrow in the toolbar to see the progress of downloads. Click no longer works. Now, cannot see download progress by (Tools-> downloads) pop-up menu.

    And no, the mouse works fine, can click on other things and drag and drop photos etc very well. Please notify. Thank you!

    Already restarted the computer since this issue started?

  • Function Array data collection


    SAMB. wrote:

    Almost, I think I would need to have a running table continuous, data at a sampling frequency x / min and be able to call the last x amount of data. I'm not sure if this is possible in LabView.

    You can do with a simple delete of table.  Just wire in the number of samples in the entrance of length and you get the last X samples on the release of the deleted section.

    Of course, doing it this way (ceases to increase table) can lead to unnecessary use of a lot of memory.

Maybe you are looking for

  • HP Pavilion G6 1283SL &amp; questions Atheros AR9285

    Hello you have a problem with the laptop from my friend who drives me crazy. Laptop HP Pavilion G6 1283 SL (Win 7 64-bit), malfunctioning adapter is Atheros AR9285. Last night, she confirmed a HP Support Assistant update automatic and just after that

  • Storage of HD 128

    My system: RENOVATED March 2015.  MB Pro 13 w / retina.  128HD 8 GB of memory.   OS X EL Capitan 10.11.1 something takes over 60% of HD storage as 'OTHER '.  I don't know what it is or how to find out if I transferred to old MB Pro 2010.  Can I delet

  • X 3990 can you connect multiple if yes screens regardless how or are there other options?

    Recently bought ACER X 3990 and you want to connect to independent screens multiople is this possible?

  • Why my LED does not illuminate

    Hi all Pls see my attached VI. Need your help. Why not my LED turn it on in the condition of the false case structure? Thank you! The cat.

  • Alienware M17x R4 speaker problem

    Hi- My r4 m17x is only a few months old and it works fine except the speakers. about 30% of the time my speakers making noises and spontaneous static type later, windows is no longer able to detect. When I close the laptop, (standby) and back opened