Min/ Max interval data storage

OK, so what I am trying to do is scan 2 voltages at 3K, temporarily write that data to a file or buffer, read the min and max values, and log those to a file once per minute. I'm at the point where I can scan and display the data, but really don't know where to go next. Any thoughts or ideas would be much appreciated. Thanks
Attachments:
NI-6343-2CH VDC min-max.vi ‏45 KB

You only need a single loop. You can use the "elapsed time" express VI to signal when time has elapsed, and simply use a case structure to append the averages to the data before writing (in the false case just wire the current data across). You should also open the file before the loop, append inside the loop, and only close the file once the loop completes. You can use the min&max ptbypt VI to keep track of the min and max for each interval or just keep track of it using a shift register.
LabVIEW Champion . Do more with less code and in less time .

Similar Messages

  • Find out the MIN & MAX of DATE QUARTERWISE

    Hi All ,
    I need to find out the MIN & MAX of DATE for QUARTEWISE by using SQL Only . How we can do it ? if anybody knows Please revert me .
    Thanx in Advance
    Bye

    SQL> select deptno,
    2  to_char(trunc(hiredate,'q'),'YYYY"Q"Q'),
    3  to_char(min(hiredate),'DD.MM') MIN,
    4  to_char(max(hiredate),'DD.MM') MAX
    5  from emp
    6  group by deptno, trunc(hiredate,'q');
        DEPTNO TO_CHA MIN   MAX
            10 1981Q2 09.06 09.06
            10 1981Q4 17.11 17.11
            10 1982Q1 23.01 23.01
            20 1980Q4 17.12 17.12
            20 1981Q2 02.04 02.04
            20 1981Q4 03.12 03.12
            20 1987Q2 19.04 23.05
            30 1981Q1 20.02 22.02
            30 1981Q2 01.05 01.05
            30 1981Q3 08.09 28.09
            30 1981Q4 03.12 03.12

  • Min Max Planning data uploading

    Dear All
    I have task to upload about more than 4000 items in form form Min Max Planning.
    I just wanted to ask that if i upload the data directly from excel into its table.
    Is it going to make any harm.
    Its main table name is MTL_ITEM_SUBINVENTORIES
    Requirement is urgnent there for waiting for your reply desperetely.
    Majid

    Hi Majid,
    Never update data in a table directly ... you could run into support issues with Oracle. Unless you use a public api or interface. Or be 100% that you have validated your data properly before loading i.e. Item codes, are they assigned to the relevant INV org that the subinventory belongs to etc. etc.
    For your particular issue you could use a form loader tool such a dataload.net. It is available as a freeware version (classic) that supports loading from spreadsheet to an open form or a professional version where you use a prerecording and 'background' load for more dataintensive requirements. It is still emulating datamanipulation as if it is done through a form.
    Using a loader will ensure that your data is validated properly.
    /Niels LM

  • Min & Max level

    Hi
    My client insist on the maintenance Min & Max level at storage location, however i can not maitain in standard MM.
    If i develop a separate application for maintaing Min & Max level what will be the effects on MIGO when i do Issue or Receipts.
    In this senario i will have to develop an additional check on every Movement of Materials (Issue & Receipts).
    Kindly help me out.
    Regards
    Muhammad Tahir

    Hi Tahir ,
    As said by you . the requirement cannot be fulfilled in MM.
    You may try at BIN level provided WM is implemented in your Org.
    As a storage location may consists of different materials with different stock units ( Min and Max levels will again differ ) , i doubt your req may not be fulfilled .
    Regards
    Ramesh Ch

  • DateTimeAxis min/max bug? Problems with consistent padding. Date Wrapping.

    I have been working on a problem with a BarChart object that I've created using dynamic data.
    My primary issue is that I can't seem to get the proper min/max values to set for the chart.
    To solve this I manually found the min and max of the data set of Dates and set the min and max of the chart. This allowed me to finally see all the floating custom bars (each bar is rendered with a user set fill), however now if I have a bar that extends over a year change the horizontal axis labels do not wrap the date properly, so instead of 2/10 (feb 2010) being the last date, 12/09 (dec 2009) is the last date.
    I've been trying to dynamically adjust the padding based upon a change event, but so far to no avail. Partially I think because I'm not sure which event for the function to fire on.
    private function dateAxisGen(r:Array):void {
                    var min:Number = r[0].startTime.time;
                    var max:Number = r[0].endTime.time;
                    const PAD:Number = 2;
                    const MILLISEC_IN_MONTH:Number = 2629743830;
                    const MILLISEC_IN_WEEK:Number = 604800000;
                    const MILLISEC_IN_DAY:Number = 864;
                    for (var i:int = 1; i < r.length; i++) {
                        var o:OperationXT = OperationXT(r[i]);
                        min = Math.min(o.startTime.time, min);
                        max = Math.max(o.endTime.time, max);
                    // Calculates the maximum range, then adds an appropriate
                    // padding to the chart via extra time. TODO
                    /* var range:Number = max - min;
                    if(range >= MILLISEC_IN_MONTH) {
                        dAxis.padding = (MILLISEC_IN_WEEK/1000000)/PAD;
                        dAxis.padding = (MILLISEC_IN_WEEK/1000000)/PAD;
                    } else if(range >= MILLISEC_IN_WEEK) {
                        dAxis.padding = (MILLISEC_IN_DAY)/PAD;
                        dAxis.padding = (MILLISEC_IN_DAY)/PAD;
                    } else {
                        dAxis.padding = PAD;
                    dAxis.minimum = new Date(min);
                    dAxis.maximum = new Date(max);
    this, however, does not adjust the padding properly when an operation is removed from the list. Not to mention I still have the date wrapping error. It gives me the following error:
    Cannot access a property or method of a null object reference.
        at mx.charts::AxisRenderer/measureHorizontalGutters()[C:\work\flex\dmv_automation\projects\d atavisualisation\src\mx\charts\AxisRenderer.as:2244]
        at mx.charts::AxisRenderer/calcRotationAndSpacing()[C:\work\flex\dmv_automation\projects\dat avisualisation\src\mx\charts\AxisRenderer.as:1858]
        at mx.charts::AxisRenderer/adjustGutters()[C:\work\flex\dmv_automation\projects\datavisualis ation\src\mx\charts\AxisRenderer.as:1534]
        at mx.charts.chartClasses::CartesianChart/updateAxisLayout()[C:\work\flex\dmv_automation\pro jects\datavisualisation\src\mx\charts\chartClasses\CartesianChart.as:2239]
        at mx.charts.chartClasses::CartesianChart/updateDisplayList()[C:\work\flex\dmv_automation\pr ojects\datavisualisation\src\mx\charts\chartClasses\CartesianChart.as:1366]
        at mx.core::UIComponent/validateDisplayList()[E:\dev\gumbo_beta2\frameworks\projects\framewo rk\src\mx\core\UIComponent.as:8065]
        at mx.managers::LayoutManager/validateDisplayList()[E:\dev\gumbo_beta2\frameworks\projects\f ramework\src\mx\managers\LayoutManager.as:663]
        at mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\gumbo_beta2\frameworks\projects \framework\src\mx\managers\LayoutManager.as:736]
        at mx.managers::LayoutManager/doPhasedInstantiationCallback()[E:\dev\gumbo_beta2\frameworks\ projects\framework\src\mx\managers\LayoutManager.as:1069]
    Any help with my problem would be greatly appreciated.
    ADDITIONAL INFO:
    Alright, so I've discovered that the ONLY time the date wrapping error occurs is when the axis labels contain only the month and year, any other time it places it properly.
    Does anyone know where I can report this bug?

    Perre wrote:I'm used to being able to pick one or a couple of songs and then adding it a specified playlist. Is this impossible in sonata?
    It's clearly not impossible, just different than you expect. Create your playlist as you want it to appear in the Current tab (meaning don't dump every single song from your library in there, just the ones you want) and then save the playlist.
    Perre wrote:And if I try to play the m3u file created (the one with every song listed) through freevo I get a message that the directory is empty. What am I doing wrong??
    Look at save_absolute_paths_in_playlists in your mpd.conf.

  • Charts- how to include data points outside of min/max ranges?

    I'm trying to have a chart that has a horizontal datetime axis showing a full day of info collected at irregular intervals and a linear vertical axis that acknowledges but cuts off datapoints that are above a certain number.
    For the vertical axis I thought I could just apply min/max values to achieve this, but I've found that if I have a maximum value of 25, any datapoints with a value above that are simply removed from the chartseries.items dataset (was hoping I might get something like a plot point near the top with an arrow, or the line going off the top and coming back.. but it's simply removed from the dataset.)
    For the horizontal I was wanting to show a line all the way across regardless of where the first and last datapoints fell.. how I hoped to achieve this was to retrieve the points immediately following and preciding the period but limit the min max date, so that it would theoretically show the lines going off the edge but not the actual points.
    i've thought of a few things that might work...
    is there some way to have the vertical axis parabolic so that it's mostly linear from 0-20 and then values above that take cover much less space? I don't have any idea how I'd go about setting that up..
    I have also thought about placing a dummy point at the beginning and end of the datetimeaxis... ie..
    time = chart.minimum and
    value = (first value today - last value yesterday)/(time between first time today and last time yesterday)
    .. and then would have to make those points specifically not interactive.. and i don't know how possible that is.  Also if there's a way not quite so involved that would also be awesome.
    Any feedback on how to approach this is greatly appreciated!
    Or is there something built into flex already that I've missed?

    In article <[email protected]>,
    chutla wrote:
    > Greetings!
    >
    > You can use any of the 3D display vi's to show your "main" 3d
    > data, and then use color to represent your fourth dimension. This can
    > be accessed via the property node. You will have to set thresholds
    > for each color you use, which is quite simple using the comparison
    > functions. As far as the data is concerned, the fourth dimension will
    > be just another vector (column) in your data file.
    chutla, thanks for your post, but I don't want a 3D display of the
    data....
    > Also, check out
    > the BUFFER examples for how to separate out "running" data in real
    > time.
    Not clear to me what you mean, but will c
    heck the BUFFER examples.
    > As far as autoscaling is concerned, you might have to disable
    > it, or alternatively, you could force a couple of "dummy" points into
    > your data which represent the absolute min/max you should encounter.
    > Autoscaling should generally be regarded as a default mode, just to
    > get things rolling, it should not be relied on too heavily for serious
    > data acquisition. It's better to use well-conditioned data, or some
    > other means, such as a logarithmic scale, to allow access to all your
    > possible data points.
    I love autoscaling, that's the way it should be.
    germ Remove "nospam" to reply

  • Time phase Min/max replenishment models for future dates

    Hi,
    We are working on a safety stock requirement of Maximum/Minimum replenishment model in APO.
    It seems to work great except it cannot be time phased.  Our business wants different safety stock strategies at different times of the year. 
    Please suggest if there is a way that we could “time phase” min/max replenishment models for future dates?
    Thanks in advance for your help!
    regards
    Yogendra

    Many thanks for this.
    I can see entirely why it's designed as such, but I just find it slightly frustrating that there's no way to break the link between the order and the shipment out to the depot. Just to clarify, we're not requiring the orders to change - they will still be made and will come in - but just that the orders themselves don't specifically need to be the stock that is used for the replenishment.
    So -
    1. Min Max identifies depot needs replenishing.
    2. Central distribution does not have (enough) stock to replenish.
    3. Order is made to replenish central distributions stock.
    4. We ship whatever we've got, when we've got it, to depot to replenish.
    It's the bit where Min-Max is trying to replensih a specific depot rather than our central distribution centre that's my problem.
    I suspect that, as you say, that specific issue is not directly fixable without getting our IT contractors to do a customisation.
    I'm going to look into your Supply Date Offset suggestion now, though I'm not sure how this affects the shipping after the orders are placed. The orders themselves are approved manually after we've checked our stock position (i.e. what's in with the recycling team), but we recycle & refurb probably 60% of our maint stock so there'll always be kit turning up after the order has been made because of the long lead times.
    Thanks again.

  • HP 34401A-When I run the Read Meas.vi, it has error if I do not turn off the data storage

    When I run the Read Meas.vi, it has error if I do not turn off the data storage. The same thing happen when I run the App. Example. vi. Anyone knows how to solve this problem? Thanks alot.
    KL

    LoganS wrote:
    Hi KL,
    The Read Meas.vi is one of the subvi's in the App. Example.vi, so this problem is most likely the same problem in each case. From the help for Read Meas.vi:
    Data Storage instructs the device to store the data to be sent to either the internal or external buffer. If TRUE (default), the VI stores data in the on mode. If FALSE, the VI does not retain data in the off mode. Use the off mode only with the average min/max operation when you do not need to retrieve data. You cannot configure the meter for external buffering in the off mode.
    So the question is, are you trying to retrieve any data? If so, then as indicated in the above paragraph, you cannot retrieve data and have the data storage turned off. Good luck!
    Logan S.
    Yes, I need to retrieve data. So due to that problem, I cannot really get any data. I am not sure is that problem is due to the USB GPIB or not. But once I click on the click arrow, everying goes fine from initialise, measurment... once it comes to Read measurment, it has error (say somthing like: VISA Wait on Event for RQS.vi->HP34401A Read Meas.vi->Untitled 1) I have no idea like what it shows up.
    KL

  • MRP min max reorder level changes

    Hi All,
    I wonder if anyone could please help.
    We are experiencing some issues with the setting of min/max levels for material masters.  Does anyone know how I could get a change log to show changes to the material master MRP settings?
    Thank you
    Chris

    Hi Chris,
       You can see change log for material master through TCode MM04.
      On the MM04 screen you can enter the selection parameters - Material / Plant / Sales Organization / Distribution Channel, Warehouse Number / Storage Type etc.,
       If you have a specific SAP userid whom you think might have done the change then you can enter in the Changed by Field.
       Then click on Execute button.
       In the next screen, select required line and click on details button to see the Old value and the new value data.
      Hope this helps.
    With Best Regards,
       Srinivas

  • How to Get the min,max and original values in a single query

    Hi,
    I have a task where in i have to the min , max and the original values of  a data set .
    I have the data like below and i want the target as well as mentioned below
    SOURCE
    DATASOURCE
    INTEGRATIONID
    SLOT_DATE
    SLOT1
    SLOT2
    SLOT3
    SLOT4
    SLOT5
    SLOT6
    SLOT7
    SLOT8
    SLOT9
    SLOT10
    1
    101
    201111
    100
    100
    200
    100
    100
    100
    300
    300
    300
    300
    1
    101
    2011112
    200
    200
    200
    200
    100
    100
    100
    100
    200
    300
    TARGET
    DATASOURCE
    INTEGRATIONID
    SLOT_DATE
    SLOT_VALUE
    SLOT MIN
    SLOT_MAX
    SLOT NUMBER
    1
    101
    201111
    100
    1
    2
    SLOT1
    1
    101
    201111
    100
    1
    2
    SLOT2
    1
    101
    201111
    200
    3
    3
    SLOT3
    1
    101
    201111
    100
    4
    6
    SLOT4
    1
    101
    201111
    100
    4
    6
    SLOT5
    1
    101
    201111
    100
    4
    6
    SLOT6
    1
    101
    201111
    300
    7
    10
    SLOT7
    1
    101
    201111
    300
    7
    10
    SLOT8
    1
    101
    201111
    300
    7
    10
    SLOT9
    1
    101
    201111
    300
    7
    10
    SLOT10
    1
    101
    2011112
    200
    1
    4
    SLOT1
    1
    101
    2011112
    200
    1
    4
    SLOT2
    1
    101
    2011112
    200
    1
    4
    SLOT3
    1
    101
    2011112
    200
    1
    4
    SLOT4
    1
    101
    2011112
    100
    5
    8
    SLOT5
    1
    101
    2011112
    100
    5
    8
    SLOT6
    1
    101
    2011112
    100
    5
    8
    SLOT7
    1
    101
    2011112
    100
    5
    8
    SLOT8
    1
    101
    2011112
    200
    9
    9
    SLOT9
    1
    101
    2011112
    300
    10
    10
    SLOT10
    e
    so basically i would first denormalize the data using the pivot column and then use min and max to get the slot_start and slot_end.
    But then i
    can get the min and max ... but not the orignal values as well.
    Any thoughts would be appreciated.
    Thanks

    If you want to end up with one row per slot per datasource etc, and you want the min and max slots that have the same value as the current slot, then you probably need to be using analytic functions, like:
    with t as
    (SELECT 1 datasource,101    INTEGRATIONID, 201111     slotdate, 100    SLOT1, 100        SLOT2,    200    slot3, 100    slot4, 100    slot5, 100    slot6, 300    slot7, 300    slot8, 300    slot9, 300 slot10 FROM DUAL  union all
    SELECT 1,    101,    2011112,    200,    200,    200,    200,    100,    100,    100,    100,    200,    300 FROM DUAL),
    UNPIVOTED AS
    (SELECT DATASOURCE,INTEGRATIONID,SLOTDATE,1 SLOT,SLOT1 SLOT_VALUE
    FROM T
    UNION ALL
    SELECT DATASOURCE,INTEGRATIONID,SLOTDATE,2 SLOT,SLOT2
    FROM T
    UNION ALL
    SELECT DATASOURCE,INTEGRATIONID,SLOTDATE,3 SLOT,SLOT3
    FROM T
    UNION ALL
    SELECT DATASOURCE,INTEGRATIONID,SLOTDATE,4 SLOT,SLOT4
    FROM T
    UNION ALL
    SELECT DATASOURCE,INTEGRATIONID,SLOTDATE,5 SLOT,SLOT5
    FROM T
    UNION ALL
    SELECT DATASOURCE,INTEGRATIONID,SLOTDATE,6 SLOT,SLOT6
    FROM T
    UNION ALL
    SELECT DATASOURCE,INTEGRATIONID,SLOTDATE,7 SLOT,SLOT7
    FROM T
    UNION ALL
    SELECT DATASOURCE,INTEGRATIONID,SLOTDATE,8 SLOT,SLOT8
    FROM T
    UNION ALL
    SELECT DATASOURCE,INTEGRATIONID,SLOTDATE,9 SLOT,SLOT9
    FROM T
    UNION ALL
    SELECT DATASOURCE,INTEGRATIONID,SLOTDATE,10 SLOT,SLOT10
    FROM T)
    select DATASOURCE,INTEGRATIONID,SLOTDATE,slot,slot_value,min(slot) OVER (partition by datasource,integrationid,slotdate,rn) minslot,
        max(slot) OVER (partition by datasource,integrationid,slotdate,rn) maxslot
    FROM   
      select DATASOURCE,INTEGRATIONID,SLOTDATE,max(rn) over (partition by datasource,integrationid,slotdate order by slot) rn,slot,slot_value
      FROM
        (SELECT DATASOURCE,INTEGRATIONID,SLOTDATE,slot,slot_value,
              case when row_number() over (partition by datasource,integrationid,slotdate order by slot) = 1 or
              lag(slot_value) over (partition by datasource,integrationid,slotdate order by slot) <> slot_value
                  then row_number() over (partition by datasource,integrationid,slotdate order by slot)
                  ELSE null
                  END rn
        from unpivoted
    order by DATASOURCE,INTEGRATIONID,SLOTDATE,slot 

  • Non-server data storage

    A friend of mine is developing a database for a specific environment:
    A small number of peer-to-peer networked Windows computers in a small office, with no dedicated servers - each computer acting as an individual's workstation. They want a "central" database to store client information etc, with an interface they can all use at once to access and change the data.
    Given the nature of the environment, my first thought was that some sort of file-based data storage (not requiring a server process) would be most appropriate - Access, csv, XML....but I'm not intricately familiar with JDBC support for these mechanisms, so wasn't sure what to recommend specifically.
    They are not willing/able to spend any money on this solution, so it must use the current environment. Can someone recommend a data storage method and point me to an appropriate JDBC driver?
    Oh, and while I have your attention - anybody know of a good CSV parser? I'm currently splitting a line of data by commas, but it's also splitting strings with commas in them...

    A friend of mine is developing a database for a
    specific environment:
    A small number of peer-to-peer networked Windows
    computers in a small office, with no dedicated servers
    - each computer acting as an individual's workstation.
    They want a "central" database to store client
    information etc, with an interface they can all use at
    once to access and change the data.
    based on this i have a non-Java solution to suggest.
    use MS-Access and IIS to develop and deploy an intranet.
    there are several pros to this solution that i see
    - You can develop and deploy an intranet using web browsers as clients very quickly and relatively cheaply
    - an intranet (series of web pages) vs. a full blown application may well be easier to make changes to
    - having the data in a RDBMS (Access) which will be cost effective in this case also will make it relatively simple to upgrade port the system later
    now i like programming in java as much as the next person but from your requirements it sounds like writing an application might be overkill. in my experience doing an intranet like this is a pretty good solution.. you don't have to install anything on the clients... you already have the software for the server (if you don't have IIS most versions of Windows now have PWS or Personal Web Server which will work for this)... the important thing is to have a good database design so that you can make changes or port the client easily later if you need to.

  • I need a memory management/ data storage recomendation for my IMac 2 GH Intel Core 2 Duo

    Since giving my mid 2007 IMac a 2GB memory boost to accommodate Lion all has been well however my memory is full. I have a sizable ITunes library and 6000 photos in IPhoto, Me thinks I should store this all more effectively for the safety of the music and photos and for the well-being of the computer....but there seems to be choices. Is this where ICloud comes into play or time capsule or should I just get an external mini hard drive. Can anyone help me with some pearls of wisdom with data storage.

    Greetings John,
    There are two types of memory which you mention here.
    The 2 GB memory you refer to is RAM.  It is not used for storing information.  Rather for giving the computer a place to do much of its work.
    File storage is handled by the hard drive of the computer.
    If your available hard drive space is getting low you can move larger files to a Mac Formatted external drive:
    Faster connection (FW 800) drives:
    http://store.apple.com/us/product/H2068VC/A
    http://store.apple.com/us/product/TW315VC/A
    http://store.apple.com/us/product/H0815VC/A
    Normal speed (USB) drives:
    http://store.apple.com/us/product/H6581ZM/A
    Larger files can include entire databases like iTunes, iMovie, or iPhoto.
    Keep in mind that if you move these items to an external drive you will have to have the drive plugged in and powered on to access the data on them.  In addition, if you move important information off your internal drive to an external, you should be sure that your backup solution is backing up that external drive to keep your information safe.
    iCloud is not a file storage solution and TimeCapsule is not suited for storing databases like those mentioned above (its meant primarily as a backup solution).  I would stick with an external drive (1 to hold your big files and another one big enough to backup both your computer and the first drive).
    Here are some other general computer clean up suggestions: http://thexlab.com/faqs/freeingspace.html.
    Hope that helps.

  • Can I use a portable hard drive for ipad data storage?

    Can I use a portable hard drive for ipad data storage?  I want an iPad mini, but don't want to get a large one (memorywise) along with cellular capability.  I remember that the old iPads coiuld not communicate via their iPhone connector to transfer data.  So can I do that iwth the newest iPad mini via the lightning connector somehow?  Thanks, Tom

    No. But you can with Seagate's wireless GoDrive.

  • How to calculate min/max scan rate of PCI-MIO-16XE-50

    My board: PCI-MIO-16XE-50 , 20MHz timebase
    The min/max scan rate is0.00596-20K scan/s and the channel rate is 1.53-20Kchannels/s
    How do they calculate these data?

    Hi May
    Check out the knowledge base locate at http://digital.ni.com/public.nsf/websearch/EA4E306828AF05B586256B8F00661A8B?OpenDocument . I think it answers your question.
    Serges Lemo
    Applications Engineer
    National Instruments

  • Gaps in interval data

    Hi Gurus,
    I am using oracle 11.2.0.1 Enterprise Edition. And I tried writing query different ways but unable to get going. Your help is greatly appreciated.
    The Query should give output as I explained below.
    This query is identify the gaps in interval reads.
    Here is my create script.
    create table rtype (
    rid number,
    rdesc varchar2(30));
    insert into rtype values (1, '5-deviceinterval');
    insert into rtype values (2, '15-deviceinterval');
    create table readings (
    device_id number,
    rid number,
    qstartid     number,
    qfinishid     number,
    readvalue number,
    readtimestamp date);
    insert into readings values (123, 1, null,null, .951, to_date('05/01/2012 00:00:00','mm/dd/yyyy HH24:MI:SS'));
    insert into readings values (123, 1, null,null, .51, to_date('05/01/2012 00:05:00','mm/dd/yyyy HH24:MI:SS'));
    insert into readings values (123, 1, null,null, .51, to_date('05/01/2012 00:10:00','mm/dd/yyyy HH24:MI:SS'));
    insert into readings values (123, 1, null,null, .51, to_date('05/01/2012 00:15:00','mm/dd/yyyy HH24:MI:SS'));
    insert into readings values (123, 1, null,null, .51, to_date('05/01/2012 00:20:00','mm/dd/yyyy HH24:MI:SS'));
    insert into readings values (123, 1, null,null, .51, to_date('05/01/2012 01:00:00','mm/dd/yyyy HH24:MI:SS'));
    insert into readings values (123, 1, null,null, .61, to_date('05/01/2012 01:05:00','mm/dd/yyyy HH24:MI:SS'));
    insert into readings values (123, 1, null,null, .41, to_date('05/01/2012 01:10:00','mm/dd/yyyy HH24:MI:SS'));
    insert into readings values (123, 1, null,null, .31, to_date('05/01/2012 01:15:00','mm/dd/yyyy HH24:MI:SS'));
    insert into readings values (123, 1, null,null, .23, to_date('05/01/2012 01:20:00','mm/dd/yyyy HH24:MI:SS'));
    insert into readings values (123, 1, null,null, .69, to_date('05/01/2012 01:25:00','mm/dd/yyyy HH24:MI:SS'));
    insert into readings values (123, 1, null,null, .85, to_date('05/01/2012 01:30:00','mm/dd/yyyy HH24:MI:SS'));
    insert into readings values (123, 1, null,null, .51, to_date('05/01/2012 02:10:00','mm/dd/yyyy HH24:MI:SS'));
    insert into readings values (123, 1, null,null, .61, to_date('05/01/2012 02:15:00','mm/dd/yyyy HH24:MI:SS'));
    insert into readings values (123, 1, null,null, .41, to_date('05/01/2012 02:20:00','mm/dd/yyyy HH24:MI:SS'));
    insert into readings values (123, 1, 1,     null, .31, to_date('05/01/2012 02:25:00','mm/dd/yyyy HH24:MI:SS'));
    insert into readings values (123, 1,null,1, .23, to_date('05/01/2012 03:20:00','mm/dd/yyyy HH24:MI:SS'));
    insert into readings values (123, 1,null,null, 2.23, to_date('05/01/2012 03:25:00','mm/dd/yyyy HH24:MI:SS'));
    insert into readings values (123, 1,null,null, .23, to_date('05/01/2012 03:30:00','mm/dd/yyyy HH24:MI:SS'));
    insert into readings values (123,2,null,null, 16.71, to_date('05/01/2012 01:00:00','mm/dd/yyyy HH24:MI:SS'));
    insert into readings values (123,2,null,null, 17.81, to_date('05/01/2012 01:15:00','mm/dd/yyyy HH24:MI:SS'));
    insert into readings values (123,2,null,null, 191.11, to_date('05/01/2012 01:30:00','mm/dd/yyyy HH24:MI:SS'));
    insert into readings values (123,2,null,null, 221.11, to_date('05/01/2012 01:45:00','mm/dd/yyyy HH24:MI:SS'));
    insert into readings values (123,2,null,null, 61.71, to_date('05/01/2012 02:00:00','mm/dd/yyyy HH24:MI:SS'));
    insert into readings values (123,2,null,null, 71.81, to_date('05/01/2012 03:15:00','mm/dd/yyyy HH24:MI:SS'));
    insert into readings values (123,2,null,null, 911.11, to_date('05/01/2012 03:30:00','mm/dd/yyyy HH24:MI:SS'));
    insert into readings values (123,2,null,null, 121.11, to_date('05/01/2012 04:45:00','mm/dd/yyyy HH24:MI:SS'));
    insert into readings values (123,2,null,null, 61.71, to_date('05/01/2012 05:00:00','mm/dd/yyyy HH24:MI:SS'));
    insert into readings values (123,2,null,null, 72.81, to_date('05/01/2012 05:15:00','mm/dd/yyyy HH24:MI:SS'));
    insert into readings values (123,2,null,null, 941.11, to_date('05/01/2012 05:30:00','mm/dd/yyyy HH24:MI:SS'));
    insert into readings values (456,2,null,null, 6.71, to_date('05/01/2012 01:00:00','mm/dd/yyyy HH24:MI:SS'));
    insert into readings values (456,2,null,null, 7.81, to_date('05/01/2012 01:15:00','mm/dd/yyyy HH24:MI:SS'));
    insert into readings values (456,2,null,null, 91.11, to_date('05/01/2012 01:30:00','mm/dd/yyyy HH24:MI:SS'));
    insert into readings values (456,2,null,null, 121.11, to_date('05/01/2012 01:45:00','mm/dd/yyyy HH24:MI:SS'));
    insert into readings values (456,2,null,null, 6.71, to_date('05/01/2012 02:00:00','mm/dd/yyyy HH24:MI:SS'));
    insert into readings values (456,2,null,null, 7.81, to_date('05/01/2012 03:15:00','mm/dd/yyyy HH24:MI:SS'));
    insert into readings values (456,2,1,null, 91.11, to_date('05/01/2012 03:30:00','mm/dd/yyyy HH24:MI:SS'));
    insert into readings values (456,2,null,1, 121.11, to_date('05/01/2012 04:45:00','mm/dd/yyyy HH24:MI:SS'));
    insert into readings values (456,2,null,null, 6.71, to_date('05/01/2012 05:00:00','mm/dd/yyyy HH24:MI:SS'));
    insert into readings values (456,2,null,null, 7.81, to_date('05/01/2012 05:15:00','mm/dd/yyyy HH24:MI:SS'));
    insert into readings values (456,2,null,null, 91.11, to_date('05/01/2012 05:30:00','mm/dd/yyyy HH24:MI:SS'));
    insert into readings values (456,2,null,null, 121.11, to_date('05/01/2012 06:45:00','mm/dd/yyyy HH24:MI:SS'));
    I would like to get output as below. I have billions of records in readings table, so would like to have good performance.
    As you can see rtype 1 is 5 minutes reading interval and rtype 2 is 15 minutes reading time interval.
    Expected output
    device_id     rtype          missing_interval_date_time     qty
    123          1          05/01/2012 00:30:00
    123          1          05/01/2012 00:35:00
    123          1          05/01/2012 00:40:00
    123          1          05/01/2012 00:45:00
    123          1          05/01/2012 00:55:00
    123          1          05/01/2012 01:35:00
    123          1          05/01/2012 01:40:00
    123          1          05/01/2012 01:45:00
    123          1          05/01/2012 02:05:00
    123          1          05/01/2012 02:30:00          1 - Since quality data start with qstartid
    123          1          05/01/2012 02:35:00          1
    123          1          05/01/2012 02:40:00          1
    123          1          05/01/2012 02:45:00          1
    123          1          05/01/2012 03:15:00          1 - end quality data with qendid
    123          1          05/01/2012 03:35:00
    123          1          05/01/2012 03:40:00
    123          1          05/01/2012 23:55:00
    123          2          05/01/2012 00:00:00 --(Similarly for same device_id another rtype with 15 min interval)
    123          2          05/01/2012 00:15:00
    123          2          05/01/2012 00:30:00
    123          2          05/01/2012 00:45:00
    123          2          05/01/2012 02:15:00
    123          2          05/01/2012 02:30:00
    123          2          05/01/2012 02:45:00
    123          2          05/01/2012 03:00:00
    123          2          05/01/2012 03:45:00
    123          2          05/01/2012 04:00:00
    123          2          05/01/2012 04:15:00
    123          2          05/01/2012 04:30:00
    123          2          05/01/2012 05:45:00
    123          2          05/01/2012 05:50:00
    123          2          05/01/2012 23:30:00
    123          2          05/01/2012 23:45:00
    456 ....
    Edited by: MDK999 on Oct 17, 2012 5:30 PM

    Hello
    Yes, I have edited other information also such as -
    "This query is identify the gaps in interval reads" and I explained that the way output should report the missing intervals. Actually expected output explains the data how it should look like. This output is created based on sample data I have provided.
    basically there are two rtypes, one has 5 minutes interval and other one has 15 minutes.
    so as you can see that missing intervals between below two reads '05/01/2012 00:25:00' and '05/01/2012 01:00:00' should be as below since its 5 minutes interval data based on rtype=1
    123          1          05/01/2012 00:30:00
    123          1          05/01/2012 00:35:00
    123          1          05/01/2012 00:40:00
    123          1          05/01/2012 00:45:00
    123          1          05/01/2012 00:55:00
    Similarly readings between two reads '05/01/2012 02:00:00' and '05/01/2012 03:15:00' should be as below since its 15 minutes interval data based on rtype = 2
    123          2          05/01/2012 02:15:00
    123          2          05/01/2012 02:30:00
    123          2          05/01/2012 02:45:00
    123          2          05/01/2012 03:00:00
    And
    when qstartid 1 , means there is missing interval data because there is some quality. So we just need to report that this missing interval data due to quality flag observed. there is qstartid=1 means quality reading start qfinishid=1, end of quality data.
    insert into readings values (123, 1, 1,     null, .31, to_date('05/01/2012 02:25:00','mm/dd/yyyy HH24:MI:SS'));
    insert into readings values (123, 1,null,1, .23, to_date('05/01/2012 03:20:00','mm/dd/yyyy HH24:MI:SS'));
    So missing interval output should be
    123          1          05/01/2012 02:30:00          1 - Since quality data start with qstartid
    123          1          05/01/2012 02:35:00          1
    123          1          05/01/2012 02:40:00          1
    123          1          05/01/2012 02:45:00          1
    123          1          05/01/2012 03:15:00          1 - end quality data with qfinishid
    Thanks

Maybe you are looking for

  • 6.0.1 Keeps Crashing

    Hey there! I have a Mac mini, set up for digital signage with a VGA connection to a 46" Sharp TV. It runs a looped Keynote presentation 24/7, which I regularly update via Remote Desktop over a secure WiFi connection. I've never had any problems with

  • HELP! My library won't play more than one song!

    Okay, so I've been using iTunes to listen to my music. I ALWAYS just click on Library in the sources list and then highlight shuffle and repeat then push play and it plays and shuffles through all of my tunes. All of a sudden last night, I clicked th

  • How do I make New window open maximized the way it used to?

    How do I make New window open maximized the way it used to?

  • Steps to create a scalable signature in PS CS5?

    Hi, I have scanned a signature and would like it to scale without pixilation. What steps do I execute to convert the image to the appropriate format (raster? vector?)? Many thanks! Michael

  • If statment help-- with date issue

    How can i write this if statment. basically i want to compare my sysdate with start_date -- thanks IF (sysdate <= (start_date, to_date('7/14/2005','MM/DD/YYYY')) THEN                UPDATE test      SET           START_DATE = sysdate-1,