calculate the base on a mc on a mc

Hey people,

I have a running total. When a mc hits the table or hand it will adjust the total. The problem is that I want only the total in order to take into account when an object is placed on the mc of the hand. If I remove something from him, delete its value altogether. Now to be smart I have add when a mc hits the hand and remove a value if a mc hits the table. The problem, if I never touch the hand and continue to drop the mcs on the table, I get a negative value. Is there a way to calculate a total only when a mc is based on the mc of the hand and remove the appropriate otherwise value on that?

This error does not seem to relate to your metering code.  It indicates that a function you have expects an argument to be passed to it, and no argument is passed.  Go to your publication settings and select the option to enable debugging.  The messade of error can then include the line number where the problem arises.

Tags: Adobe Animate

Similar Questions

  • calculate week no exercise on the basis

    Hello
    Fiscal year begins with 01 - Apr. I need to calculate the week no 01-APR(financial year) 01-Jan not function
    for each date. Is there a way to calculate on this basis

    Hey, Vishal

    select
    to_char(dt,'YYYY-MM-DD') the_date,
    to_char(add_months(dt,-3),'WW') fiscal_week
    from testdata
    order by dt;
    

    First of all "transform" your date in your exercise by subtracting three months. This way April 1 will become "January 1" - who thinks like "the first day of the first fiscal month.
    Then you can simply use standard format of WW to get the number of week :-)

  • To calculate the amount on the basis of the date of

    Hello

    We must consider the functionality of oracle when it sees in 365 days a year. (for leap years 366 days)

    calendar year of 365 days. calendar year of 12 months. Months will track the number of calendar days in the month. For example the Feb has 28 days and Oct. has 31 days.

    Example:

    For the period from 27/06/12 to 20/08/12

    Annual amount of $3214.

    Calculation

    $3214 / 12 months = $267,83 per month

    For June, $267,83 / 30 days in a month = $8.93 daily rate

    6/27-6/30 is 4 days of service.  x 4 = $35,72 $8.93

    7/1-7/31 is considered to be a full month. = $267,83

    For August, 8/1 /-8/20 is considered to be 20 days. Per day = 267.83 / 31 = 8.64

    20 days = $172.79

    TOTAL = $476,34

    Please help me on how to do the following calculations.

    Concerning

    Suresh

    Another solution, works better than the previous:

    with the data as

    (

    Select to_date (June 27, 2013 ',' DD/MM/YYYY ') from_dt, to_date (August 20, 2013 ',' DD/MM/YYYY ') to_dt, amt double 3214

    )

    Select sum (DM)

    de)

    Select from_dt, to_dt, start_dt, last_dt,

    (last_dt - start_dt + 1) *--> multiply applicable days of the month at the daily amount, calculated below

    Sum)

    round)

    (amt/12) /--> calculate a monthly amount

    TO_CHAR)

    LAST_DAY (curr_dt)

    , 'DD '.

    )--> Find last day of the month and divide the monthly amount with the last day and calculate the daily amount

    2

    )--> Around the daily amount to 2 decimal places

    ) on sm--> sum the amount daily (partition to_char (curr_dt, 'MM'))

    de)

    Select from_dt, to_dt, TN,

    less (add_months (from_dt, level - 1), to_dt) curr_dt,.

    decode (level 1, less (add_months (from_dt, level - 1), to_dt), trunc (less (add_months (from_dt, level - 1), to_dt), 'MM')) start_dt;

    less (last_day (add_months (from_Dt, level - 1)), to_dt) last_dt

    from the data

    connect by level<= months_between(trunc(to_dt,="" 'mm'),="" trunc(from_dt,="" 'mm'))="" +="">

    )

    );

    SUM (DM)

    ----------------------

    476.36

    This avoids looping of data for all of the Dates if opposed to a loop for each month, which increases its performance. See plans to explain to the two queries:

    explain plan for

    with the data as

    (

    Select to_date (June 27, 2013 ',' DD/MM/YYYY ') from_dt, to_date (August 20, 2013 ',' DD/MM/YYYY ') to_dt, amt double 3214

    ),

    div_data as

    (

    Select from_dt, to_dt, annual_amount from the amt Tower (amt/12, 2) monthly_amount

    from the data

    )

    Select sum (per_day_amt)

    de)

    Select to_char (level - 1, 'Lun' + from_dt) curr_dt,.

    sum (round (monthly_amount/to_number (substr (to_char (last_day (level - 1 + from_dt), 'DDMMYYYY'), 1, 2)), 2)) per_day_amt

    of div_data

    connect by level<= (to_dt="" -="" from_dt)="" +="">

    To_char Group (level - 1, 'Lun' + from_dt)

    );

    Hash value of plan: 1042012692

    ----------------------------------------------------------------------------------------------------------------

    | ID | Operation | Name                        | Lines | Bytes | Cost (% CPU). Time |

    ----------------------------------------------------------------------------------------------------------------

    |   0 | SELECT STATEMENT |                             |     1.    13.     5 (20) | 00:00:01 |

    |   1.  TRANSFORMATION OF THE TEMPORARY TABLE.                             |       |       |            |          |

    |   2.   LOAD SELECT ACE |                             |       |       |            |          |

    |   3.    QUICK DOUBLE |                             |     1.       |     2 (0) | 00:00:01 |

    |   4.   GLOBAL TRI |                             |     1.    13.            |          |

    |   5.    VIEW                          |                             |     1.    13.     3 (34) | 00:00:01 |

    |   6.     HASH GROUP BY.                             |     1.    16.     3 (34) | 00:00:01 |

    |*  7 |      CONNECT TO WITHOUT FILTERING.                             |       |       |            |          |

    |   8.       COUNT                      |                             |       |       |            |          |

    |   9.        VIEW                      |                             |     1.    16.     2 (0) | 00:00:01 |

    |  10.         TABLE ACCESS FULL | SYS_TEMP_0FD9D86CF_5F8521E2 |     1.    44.     2 (0) | 00:00:01 |

    ----------------------------------------------------------------------------------------------------------------

    Information of predicates (identified by the operation identity card):

    ---------------------------------------------------

    7 filter (LEVEL<>

    explain plan for

    with the data as

    (

    Select to_date (June 27, 2013 ',' DD/MM/YYYY ') from_dt, to_date (August 20, 2013 ',' DD/MM/YYYY ') to_dt, amt double 3214

    )

    Select sum (DM)

    de)

    Select from_dt, to_dt, start_dt, last_dt,

    (last_dt-start_dt + 1) * sum (round ((amt/12)/to_char (last_day (curr_dt), 'JJ') 2)), in the sm (partition to_char (curr_dt, 'MM'))

    de)

    Select from_dt, to_dt, TN,

    less (add_months (from_dt, level - 1), to_dt) curr_dt,.

    decode (level 1, less (add_months (from_dt, level - 1), to_dt), trunc (less (add_months (from_dt, level - 1), to_dt), 'MM')) start_dt;

    less (last_day (add_months (from_Dt, level - 1)), to_dt) last_dt

    from the data

    connect by level<= months_between(trunc(to_dt,="" 'mm'),="" trunc(from_dt,="" 'mm'))="" +="">

    )

    );

    Hash value of plan: 1669308594

    -----------------------------------------------------------------------------------------

    | ID | Operation | Name | Lines | Bytes | Cost (% CPU). Time |

    -----------------------------------------------------------------------------------------

    |   0 | SELECT STATEMENT |      |     1.    13.     3 (34) | 00:00:01 |

    |   1.  GLOBAL TRI |      |     1.    13.            |          |

    |   2.   VIEW                           |      |     1.    13.     3 (34) | 00:00:01 |

    |   3.    KIND OF WINDOW.      |     1.    30.     3 (34) | 00:00:01 |

    |   4.     VIEW                         |      |     1.    30.     2 (0) | 00:00:01 |

    |*  5 |      CONNECT TO WITHOUT FILTERING.      |       |       |            |          |

    |   6.       QUICK DOUBLE |      |     1.       |     2 (0) | 00:00:01 |

    -----------------------------------------------------------------------------------------

    Information of predicates (identified by the operation identity card):

    ---------------------------------------------------

    5 filter (LEVEL<>

    Post edited by: PurveshK
    Updated with explanation.

  • Calculate the speed of the target by using photoelectric sensors 2

    I use 2 photoelectric sensors mounted parallel to each other. As the target passes in front of the sensor, the signal of output voltage goes from 0V to 10V. Because I know that the distance between the sensors, I need to use the difference of rise time of the signal between the sensors to calculate speeds. I can do that when I export the data to excel, but I would do it automatically into my LabVIEW code.

    The data of my sensors are the type of waveform. I can extract the waveform (t0, dt, Y) components using 'Get waveform components' and then look for the timestamp for each value using t0, dt and index value. I need to calculate the timestamp of each sensor once the signal passes to 10V (Y = 10V). I can't extract the components of waveform for signals from sensors (seems to only be able to extract the components for a sensor) and once I extracted components, setting up my calculation of the speed. I think I need a case structure to save the timestamp, once the signal hits first 10V (if Y = 10V save timestamp; if Y = 0V continue indexing of values).

    Any suggestions on the extraction of components of form of wave or indexation of values and calculation speed are greatly appreciated! The code I wrote to collect signals is attached.

    Thank you very much

    Alberto M.

    Here is a sample of the signals of the sensor showing the difference of signal rise time.

    1. you must use the finished sample mode and read all samples.  To match what you have, I would use 10 k samples.  That would be 5 seconds worth of data.  This eliminates the need for the while loop and gives you the full waveforms.

    2. just use the base trigger level detection VI (in the Signal Processing-> measures of waveform-> palette of Waveform Monitoring) to get the time for every rising edge.  Then it's a simple subtraction and divide.

    In addition, if you want to make things even easier, you could have used a camera with a meter of A - B.  Then the meter gives you just the time difference directly.

  • Calculate the material database

    Hi all

    I'm new Oracle DBA in the industry, not a lot of experience in the database. I have some confusion. Maybe it's stupid question but this turning point in my mind. Please help to solve these.

    (1) for new projects comes, I'm confusing all cache/RAM required and CPU. Although I can calculate the capacity of the hard drive.  for example - my Application user say we have total TPS (transactions per second) is 1000 (200 update, delete 300, 100 and 200 insertion selects), so in this case how can I calculate hardware capacity, and how I can answer for them.

    (2) this is the reverse of the first question.  Suppose a database running, and everything works fine. I want to calculate the GST (transactions per second). means how select/update/insert/delete running in the second. How to calculate or identified TPS.

    Thanks in advance...

    Reg,

    Hard

    Thank you all, I got my answer...

    Oracle Capacity Planning

    Introduction - Database management

    The best way to perform the Oracle capacity planning is with planningsof the worksheet of the ability of the Oracle. Database management has increased over the years to the simple management of a few tables and indexes to a complex of interlocking responsibilities ranging from management of objects of database to participate in decisions large enterprise on hardware, software and development tools.

    In order to fully discharge these functions the modern Oracle DBA needs one big together skills. In the last hours, we will discuss the skills needed, and specifically how they apply to an Oracle DBA.

    Capacity planning system

    In a green field operation (the one where you're here in front of the equipment and the database), a DBA will have a critical role to play in planning and configuration of the new system. Even in existing environments the ability to predict new servers, new databases, or improvements to existing databases and systems is crucial.

    Essentially the DBA should be concerned with two main questions:

    1. Get enough server to ensure an adequate return
    2. Sufficient backup and power of recovery for backup and restoration carried out respecting the time constraints required.

    All this is actually under the heading planning resources and capabilities. Resources and capacity planning Oracle is a database intensive resources system. The more CPU, memory and disk resources, you can provide Oracle, better it performs. Planning with Oracle resources becomes more a game of "How can we afford to buy" instead of "what is the minimum configuration. A minimally configured Oracle server won't work effectively. Specification of resource for Oracle In the specification of resources, there are several questions that should be answered.

    1. How many users will use the system today and in the future?
    2. Data will include the system contain both now and in the future, we don't know the growth rate?
    3. What response time are expected?
    4. The availability of this system is planned?

    Why are these issues important?

    1. How many users will use the system today and in the future?

    This issue is important, because it effects how much processing power is going to be necessary. The number of users will determine the number and speed of the processors, memory, the related network configuration size.

    1. Data will include the system contain both now and in the future, we don't know the growth rate?

    This issue is important because it determines the disk needs, how much storage will need to take the data we have today and how it will be necessary for the growth. The answer to this question also allows to determine how much memory will be needed.

    1. What response time are expected?

    This question is important because it pushes the number, type and speed of CPU resources, but also of network problems. He will lead also issues such as the number and speed disk configuration disks, number and speed of the controllers, disk partitioning decisions.

    1. The availability of this system is planned?

    This question is important because the availability of the system grows the type of RAID (1, 0, 0/1, RAID5) configuration, the type of scheduled backup (cold, warm) and parallel server problems. Requirements change if all that is expected is the system to be available during business hours from Monday to Friday, or if the system is supposed to be available 24 X 7 seven days a week. This also leads the type of backup media, be it a single tape drive is all that is necessary or is it a hi-speed, tape-stacker, multichannel, solution based silo?

    To properly perform a capacity planning cooperative efforts should be made between system administrators, database administrators, and network administrators.

    Step 1: Size of the Oracle database

    A starting point for the whole process of capacity planning is to know how many and what size, databases will be based on a given server resource. The physical size of the tables, indexes, clusters, and LOB storage areas will play an essential role in the sizing of the overall database, including areas of shared global memory and disk farm. DBAS and developers must work together in order to properly size the physical files of the database. The design of the database will also lead the placement and the number of storage spaces and other resources of database such as the size and quantity of newspapers of recovery, rollback segments and their associated buffers.

    Typically areas of buffer of data to an LMS database block size out to between 1/20 to 1/100 the physical sum relative to the total number of database file sizes. For example, if the physical size of the database is 20 gigabytes the database block buffers should on about 200 megabytes to 1 gigabyte in size depending on the how the data is used. In most cases the LMS shared pool would be size out to about 20-150 megabytes maximum according to the usage model for the common areas of SQL (see next lesson). For a system of 20 gigabytes the redo logs would most likely run between 20 and 80 megabytes, you want mirrored volumes and probably not less than 5 groups. The pad of paper to support a 50 megabyte redo log file would be a minimum of 5 megabytes may be as large as 10 megabytes. The last major factor for BMG would be the size of the sorting box, for this size of a database, a sort of 10 to 20 megabytes field is on the right (according to the number and size of all kinds). Remember that sort areas can be a part of the shared pool or a part of the large pool, so we'll cover in a future lesson.

    So on that basis we've determined? Gives a choice of 400 megabytes for our size memory buffer of data block, 70 megabytes for the shared pool, buffers of the newspaper of 4 to 10 MB (40 MB) and a size of 10 megabytes sort field. We look at a megabyte of 500-600 LMS with the important factors of non - DBA added in. Since you are not supposed to use more than 60% of the physical memory (according to the interviewee) it means w will need at least a gigabyte of RAM. With this size of database a single UC probably won? t give enough performance so we are probably looking at least a 4-processor machine. If we have more than one instance installed on the server, the memory requirements will increase.

    Step 2: Determine the number and Type of users:

    Of course, a database of a user will require fewer resources than the user database of a thousand. Generally, you will need to take a LOOT at how many memory resources and drive each user will need. An example would be to assume that a user installed 1,000 users base, only 10 percent of them at the same time will use the database. That leaves 100 concurrent users, those who perhaps a second 10 percent will do the activity requiring sorting areas, this brings the number up to 10 users each use (in our previous example) 10 megabytes of memory each (100 MB). In addition each of the 100 users simultaneous need about 200 k of space (depending on the activity, BONE, and other factors) process so there is an additional charge of 20 megabytes just for the user process space. Finally, each of these users will require probably some amount of disk resource (or less if they are client-server or web-based) let? s give them 5 meg of disk to start each, which adds up to 5 gigabytes of disk (give or take a meg or two.)

    Step 3: Determine the hardware requirements for the required response time meet and support of user Support:

    This step is the system administrator and maybe the seller of equipment. Given our mix of 1000:100:10 users and any required response time numbers, they should be able to configure a server that will obtain good results. Usually, this will require several, interfaces multi-lane disks and several separate physically the drive bays.

    Step 4: Determine the material backup to support the requirements of availability required:

    Here again the admin system and hardware vendor will have a helping hand in the decision. Based on the size of the disks and the speed of the maximum recovery time backup solution should be developed. If there is no way to meet your requirements of availability required using backup schemas simple more esoteric architectures can be specified as strips of multiple channels, hot databases in standby or even Oracle Parallel Server. Let? s say we need a requirement of availability 24 X 7 with instant failover (no recovery time because of the critical nature of the mission of the system). This type of specification would require Oracle Parallel Server in a configuration of automated failover. We also use either a double or triple mirror on disk so that we could divide the mirror to perform backups without losing the protection of mirroring.

    Let? s compile what we have determined so far:

    Material: 2-4 CPU (for higher-speed CPU we can) with at least 1 gigabyte (preferably 2) of RAM shared, at least 2 disk controllers each with many channels, 90 gigabytes of disk resource using a three way mirror to give us a matrix to mirror a triple 30 concert. The systems themselves should have a sufficient internal disk subsystem to support the operating system and the swap and the requirements of pagination. Systems must be able to share the disk resources so should support clustering. High-speed tape backup to minimize the folding times mirror.

    Software: Oracle Parallel Server, Cluster, the network management software, software backup management software to support backup material.

    Capacity and resource planning is not an exact science. Basically, look for a moving target. Dual Pentium II 200 NT Server with 10 GB of 2 GB SCSI disks for $5 k, I bought 2 years ago has a modern equivalent in the Pentium III 400 with the builtin 14 concert my father-in-law just bought for $1 k. At the time where we specify and purchase of a system, it is already replaced. You should insist on power substitute options more effective, more inexpensive they are available during the phases of specification and procurement.

    Reg,

    Hard...

  • Calculate the Total cumulative

    The following is designed as a repeating subform with new line instances added via an Add button.

    I need each Rollup field (on each line) to automatically calculate on the basis of either:

    1. the amounts of payment 'in progress' and 'all the above' (i.e. of cumulative payment 3 ($ 1,800) = sum of payments 1, 2 and 3)

    or

    2 tpayment cumulative previous he + current payment (i.e. cumulative payment ($ 1,800) 3 = cumulative payment ($ 1100) 2 + 3 ($700) payment )

    Cumulative payment period

    1 500 500

    2 600 1 100

    3 700 1 800

    Can someone please help. I understand that I need to retrieve the "previous instances" don't put no not sure what I'm doing wrong...

    Here is my solution to this problem.

    Note the I<> in the condition of the loop for. Which stops the calculations on which line you enter numbers in. (You don't want to add the amount of line 3 to the total of line 2, for example).

  • Javascript EA - calculate log() base 10?


    I am writing an algorithm to calculate the value and the graduations on the y-axis of a dynamic chart.

    For the calculation, the cleanest way, I need to be able to calculate a log() with a base of 10.

    JavaScript has a logarithmic base-10 - Math.log10 - function as a constant - Math.LN10 - and to open a session can be calculated for any base - Math.log (number, base). Unfortunately, none of them seem to work in version Edge lead CC of javascript.

    Can someone tell me how to get the log of a number in base 10 on board animate CC?

    TIA,

    Carolyn

    You should have regular access to all javascript mathematical functions on the edge. I tried the ones you mention and they return the correct values. Outside Math.log (number, base) which I have never seen elsewhere. The following should work as well:

    function getBaseLog (num, base) {}

    return Math.log (y) / Math.log (x);

    }

    Math.log - JavaScript | DND

    There may be another error in your code - what results you get if you write in the console?

  • How Illustrator calculates the height of box Em?

    I am trying to determine how Illustrator calculates the basic position of the top of the a Point text object bounding box.  She seems to be the same distance as an object of text box with the game setting of first base to box Em height line.  I just do not know what assets within the scope of the police which matches.  Help of the Illustrator defines it as:

    "The top of the box em in Asian fonts touches the top of the type object. This option is available regardless of the preference show Asian Options. »

    For some fonts, this distance seems to be near the pole of the police, but this is not true for each font.  The clues how Illustrator calculates it?

    metric-example.png

    Here you go

    var idoc = app.activeDocument;
    var itext = idoc.selection[0];
    
    var top = itext.position[1];
    var base = itext.anchor[1];
    
    alert('Em? size: ' + (top-base));
    
  • Calculate the % of 'Make with Warp' indication / ARC?

    Hello community,

    I translate a menu German so I hope I get things right.

    I would really like to know how to calculate the percentage of the CRA found in the options function if you choose the command OBJECT > MAKE WITH WARP > ARC of STYLE-> bend /(curve?)

    Bildschirmfoto 2015-01-06 um 13.09.09.png

    Why?

    I want to print a long line straight line on a piece of paper, cut it out and then paste this line into a simplified conical water glass.

    What is going on?

    The line appears folded due to the deformation / curvature of the object from its tapered.

    What then?

    With the option to MAKE WITH WARP I can compensate for warping/bending of printing in - / decrease the percentage of the warp/curvature.

    So far, I have found the percentage just by trial and error print lines with different curves which is a LOT of work (and paper), with the lines on the glass to see who looks all right.

    I was hoping someone knows how the percentage is calculated... In the photo above: what does the 25% stand for... ?

    Any ideas?

    Best regards and a happy new year!

    Carl

    Carl,

    In a certain vagueness, the % of Warp expresses the angle between the part of initially vertical end in % of 180 °.

    In other words, inspire and keep original width of base, an arc (set) is built where the arc (set) has the width of origin and forms an angle of 180 ° * 100/Warp % of the corresponding circle.

    When you have a line as in this case, it's just the width of the line, and there is no set of arcs.

    25% in an angle of 45 °

    50% is an angle of 90 °

    75% of an angle of 135 °

    100% an angle of 180 °

    So if you know the angle spread, you can easily calculate the % of Warp, dividing the angle of 180 ° and multiplying by 100.

    This angle depends on the angle at the top of the cone, the size of the cone, and the diameter of the line rate.

  • Calculate the binary logarithm in Flex?

    And here's one for the mathematicians in the audience:

    How to calculate log2(x) in FLEX? Check out the mathematics library, it provides only the Math.log (x) function.

    Thoughts?

    Hello

    The Math.log method calculates the natural logarithm of a number.  Multiply the result of Math.log() of Math.LOG2E to get the logarithm in base 2.

  • Calculate the previous three months

    I want to calculate the past 3 months on the basis of sysdate in 3 separate columns. I get the previous month by executing the following SQL statement:
    select EXTRACT(MONTH FROM TRUNC(SYSDATE,'MONTH')-1)mn1 from dual
    The current month is July, then how can I get 05, 04 as output.

    Yogesh

    Hello

    Just remove TRUNC...

    select EXTRACT(MONTH FROM (SYSDATE))-1 mn1,EXTRACT(MONTH FROM (SYSDATE))-2 mn2,EXTRACT(MONTH FROM (SYSDATE))-3 mn3 from dual;
    

    AJ

  • Add more than 2 lines for a select statement without inserting rows in the base table

    Hi all

    I have a below a simple select statement that is querying a table.

    Select * from STUDY_SCHED_INTERVAL_TEMP
    where STUDY_KEY = 1063;

    but here's the situation. As you can see its return 7 ranks. But I must add
    2 rows more... with everything else, default or what exist... except the adding more than 2 lines.
    I can't insert in the base table. I want my results to end incrementing by 2 days in
    measurement_date_Taken on 01-APR-09... so big measurement_date_taken expected to
    end at study_end_Date...



    IS IT STILL POSSIBLE WITHOUT INSERT ROWS IN THE TABLE AND PLAYIHY ALL AROUND WITH
    THE SELECT STATEMENT?

    Sorry if this is confusing... I'm on 10.2.0.3

    Published by: S2K on August 13, 2009 14:19

    Well, I don't know if this request is as beautiful as my lawn, but seems to work even when ;)
    I used the "simplified" version, but the principle should work for your table, S2K.
    As Frank has already pointed out (and I fell on it while clunging): simply select your already existing lines and union them with the 'missing documents', you calculate the number of days that you are "missing" based on the study_end_date:

    MHO%xe> alter session set nls_date_language='AMERICAN';
    
    Sessie is gewijzigd.
    
    Verstreken: 00:00:00.01
    MHO%xe> with t as ( -- generating your data here, simplified by me due to cat and lawn
      2  select 1063 study_key
      3  ,      to_date('01-MAR-09', 'dd-mon-rr') phase_start_date
      4  ,      to_date('02-MAR-09', 'dd-mon-rr') measurement_date_taken
      5  ,      to_date('01-APR-09', 'dd-mon-rr') study_end_date
      6  from dual union all
      7  select 1063, to_date('03-MAR-09', 'dd-mon-rr') , to_date('04-MAR-09', 'dd-mon-rr') , to_date('01-APR-09', 'dd-mon-rr') from dual union all
      8  select 1063, to_date('03-MAR-09', 'dd-mon-rr') , to_date('09-MAR-09', 'dd-mon-rr') , to_date('01-APR-09', 'dd-mon-rr') from dual union all
      9  select 1063, to_date('03-MAR-09', 'dd-mon-rr') , to_date('14-MAR-09', 'dd-mon-rr') , to_date('01-APR-09', 'dd-mon-rr') from dual union all
     10  select 1063, to_date('03-MAR-09', 'dd-mon-rr') , to_date('19-MAR-09', 'dd-mon-rr') , to_date('01-APR-09', 'dd-mon-rr') from dual union all
     11  select 1063, to_date('22-MAR-09', 'dd-mon-rr') , to_date('23-MAR-09', 'dd-mon-rr') , to_date('01-APR-09', 'dd-mon-rr') from dual union all
     12  select 1063, to_date('22-MAR-09', 'dd-mon-rr') , to_date('30-MAR-09', 'dd-mon-rr') , to_date('01-APR-09', 'dd-mon-rr') from dual
     13  ) -- actual query:
     14  select study_key
     15  ,      phase_start_date
     16  ,      measurement_date_taken
     17  ,      study_end_date
     18  from   t
     19  union all
     20  select study_key
     21  ,      phase_start_date
     22  ,      measurement_date_taken + level -- or rownum
     23  ,      study_end_date
     24  from ( select study_key
     25         ,      phase_start_date
     26         ,      measurement_date_taken
     27         ,      study_end_date
     28         ,      add_up
     29         from (
     30                select study_key
     31                ,      phase_start_date
     32                ,      measurement_date_taken
     33                ,      study_end_date
     34                ,      study_end_date - max(measurement_date_taken) over (partition by study_key
     35                                                                          order by measurement_date_taken ) add_up
     36                ,      lead(measurement_date_taken) over (partition by study_key
     37                                                          order by measurement_date_taken ) last_rec
     38                from   t
     39              )
     40         where last_rec is null
     41       )
     42  where rownum <= add_up
     43  connect by level <= add_up;
    
     STUDY_KEY PHASE_START_DATE    MEASUREMENT_DATE_TA STUDY_END_DATE
    ---------- ------------------- ------------------- -------------------
          1063 01-03-2009 00:00:00 02-03-2009 00:00:00 01-04-2009 00:00:00
          1063 03-03-2009 00:00:00 04-03-2009 00:00:00 01-04-2009 00:00:00
          1063 03-03-2009 00:00:00 09-03-2009 00:00:00 01-04-2009 00:00:00
          1063 03-03-2009 00:00:00 14-03-2009 00:00:00 01-04-2009 00:00:00
          1063 03-03-2009 00:00:00 19-03-2009 00:00:00 01-04-2009 00:00:00
          1063 22-03-2009 00:00:00 23-03-2009 00:00:00 01-04-2009 00:00:00
          1063 22-03-2009 00:00:00 30-03-2009 00:00:00 01-04-2009 00:00:00
          1063 22-03-2009 00:00:00 31-03-2009 00:00:00 01-04-2009 00:00:00
          1063 22-03-2009 00:00:00 01-04-2009 00:00:00 01-04-2009 00:00:00
    
    9 rijen zijn geselecteerd.
    

    Is there a simpler way (in SQL), I hope that others join, and share their ideas/example/thoughts.
    I feel that it is using more resources there.
    But I have to cut the daisies before now, they interfere my 'grass-green-ess";)

  • How to calculate the n prorations retained earnings

    When I am trying to enter code allocation House fast proration formula it gives me error. This same code works very well with the base salary only FF but with room allowance and other allowances n deducitons its gives me the following error: -.
    -------------------------------------------------------------------------------------------------------------
    APP-FF-33065: line 68: only the data base of points or input variables can be missed.

    Cause: You specified an item to be in default, which is not an element of database or an input variable.

    Action: Use an input variable or database in the default statement. If you want to change the value of a local variable, simply assign a value to it. You can change the global variable values using the form to handle Globals.
    ------------------------------------------------------------------------------------------------------------
    Now, the line 68 refers to the next line that I gave to my quick formula:

    IF (prorate_start did not fail) then
    (
    l_days = days_between (prorate_end, prorate_start) + 1
    day_in_Month = days_between (PAY_PROC_PERIOD_END_DATE, PAY_PROC_PERIOD_START_DATE) + 1
    House_allowance = (House_allowance * l_days) / day_in_Month
    House_allowance = (House_allowance)
    House_allowance2 = (House_allowance)
    House_allowance_tzs =(House_allowance*EXCHANGE_RATE1)
    )

    Please note that the folloing was referred to as a default value in the FF:

    the default for prorate_end is January 1, 1900 "(date)
    the default for prorate_start is January 1, 1900 "(date)
    default value for PAY_PROC_PERIOD_END_DATE IS 1 January 1950 ' (date)
    default value for PAY_PROC_PERIOD_START_DATE IS 1 January 1950 ' (date)

    I am trying to calculate the employee's salary n deductions based on the number of days the employee has worked.

    Please help/help me!

    I guess you need to add 'prorate_start' to the part "entries are" your quick formula. Same of course for the prorate_end (date).

  • to calculate the number of days between 2 dates

    Hi all


    I need to calculate the number of days between 2 dates.
    Y at - it no oracle built on that basis.



    Thanks in advance
    Kind regards

    Nick

    user646786 wrote:
    Hello

    Thanks a lot its really useful, but I must make a correction, I just want weekdays rather working days

    As already said, there are many examples on the forum of the calculation of the working days or the days of the week or whatever you want between certain dates of restrictions. You will need to have a go at adapting what has already been given before and then when you get stuck, come here and your postcode, and someone will take a look for you.

  • How can I change the base station Airport of NAT mode?

    I'm trying to set up an Airport base station and stuck because I have the following message is displayed, but no idea how do what he asks...

    Status is showing as Double NAT and then asking me to move on to the base station in bridge DHCP/NAT mode.

    But where do I do this?

    Thank you

    It can be difficult to get the router to bridge sometimes... but if all goes well... Click on the airport icon in airport utility and then click on edit.

    Go to the network tab and change DHCP and NAT to bridge.

    Click Update at the bottom of the page... Then, everything should be good.

    If you are having problems follow these steps.

    Reset factory airport and then do a manual installation. I recommend that you connect with ethernet which is much more reliable, but your MBPr is not the most important network port that exists... Although there is a bolt of lightning at low cost for the ethernet card.

Maybe you are looking for