Sum of running times in spreadsheet

I am trying to figure out if times for a runner can be calculated and averaged in Pages? Any suggestions since I am new to Pages. Thanks!

Tim,
Yes, you can do the calculation in a Pages Table. I wouldn't work out the solution there though. The equation management and editing tools just seem easier in Numbers. When you're done and like the result in Numbers, you can copy the table to Pages and use it there if you like, but I'm not sure I can see an advantage to moving to Pages.
Jerry

Similar Messages

  • Summing at run time in a select

    Hi There,
    My table with data is like this
    Salesrep                            dealid          revenue    yr      qtr
    [email protected]               sr123          1000       2012    1
    [email protected]               sr124           150        2012     1
    [email protected]               sr125           3150        2012     2
    [email protected]               sr126           200         2012      1
    .I want to get the sum of the revenue by sales rep based on the condition that the revenues are added where revenue is between 0 - 1000 "small", 1001 - 2000 "Medium", > 2001 "Large"
    so output will be something like
    [email protected] 1150 small, 0 medium, 3150 large
    [email protected] 200 small, 0 medium, 0 large
    Can we do this in a select?
    Thanks,
    Sun

    Something like this:
    WITH temp AS
      ( SELECT 1250 revenue FROM DUAL
      UNION ALL
      SELECT 2000 FROM DUAL
      UNION ALL
      SELECT 5500 FROM DUAL
      UNION ALL
      SELECT 1600 FROM DUAL
      UNION ALL
      SELECT 900 FROM DUAL
    SELECT
      CASE
        WHEN revenue BETWEEN 0 AND 1000
        THEN revenue ||' '||'Small'
        WHEN revenue BETWEEN 1001 AND 2000
        THEN revenue ||' '||'Medium'
        WHEN revenue > 2000
        THEN revenue||' '||'Large'
      END output
    FROM TEMP;
    OUTPUT                                         
    1250 Medium                                    
    2000 Medium                                    
    5500 Large                                     
    1600 Medium                                    
    900 Small    

  • Run time error when clicking on sum button

    Hi,
        I have used a field (data type-QUAN,length-10,Decimal Places-3)
    in an internal table. I have passed this table in 'REUSE_ALV_GRID_DISPLAY'.
        When I wan to see the 'sum' by clicking the button on the application tool bar , There is always a run time error.
        Please help as quick as possible.
    Regards,
    Sourav Paul.

    Hi,
    try following,
    DATA: GT_EVENTS TYPE SLIS_T_EVENT.
    INITIALIZATION.
    PERFORM BUILD_EVENTS CHANGING GT_EVENTS.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
               IT_EVENTS          = GT_EVENTS[]
        TABLES
          T_OUTTAB           = IFINAL.
    ENDFORM.                    " display_output
    FORM BUILD_EVENTS CHANGING GT_EVENTS TYPE SLIS_T_EVENT.
      DATA: LINE_EVENT TYPE SLIS_ALV_EVENT.
      CLEAR LINE_EVENT.
      LINE_EVENT-NAME = 'TOP_OF_PAGE'.
      LINE_EVENT-FORM = 'TOP_OF_PAGE'.
      APPEND LINE_EVENT TO GT_EVENTS.
    ENDFORM.                    "build_events
    Reward pts if usefull.
    Regards,
    Dhan

  • Oracle 10.2 Predictive Analytics Spreadsheet Add-In - Run-time error 429

    Hi,
    I installed the "Oracle 10.2 Predictive Analytics Spreadsheet Add-In" for Excel. When I'm running Excel, and I click the OraclePA menu option "connect", I get the error:
    Run-time error 429:
    ActiveX component can't create object
    I am running Win-2000, and I have the 10.2.0.1.0 (with Data Mining Options) DB installed locally.
    Any ideas on how to resolve this error?
    Thanks.

    Hello,
    this is the typical error seen when trying to activate a program after installing it without restarting your computer first.
    you it tried to restart your computer ????
    What is version of the excel ?

  • Importing a spreadsheet at run-time

    Hi guys,
    I'm trying to create an application that compares data in 2 tables - 1 in the database and the other from a user specfied spreadsheet. To facilitate the latter, I have created a "File Browse..." and "Go" button so that the user can choose the spreadsheet to upload. However, I cannot figure out how to convert this spreadsheet to a table at run-time. Any help would be much appreciated.
    Thanks.

    Adrian,
    Have a look at: http://www.oracle.com/technology/products/database/htmldb/howtos/howto_create_upload_spreadsheet_form.html
    It's not 100% what you're looking for (as it requires you to cut & paste from the spreadsheet), but it may do what you're after.
    Thanks,
    - Scott -

  • How do i change the image path at run time in wpf ?

    I have a button and i need to show image two different image based on condition. 
    <Button x:Name="btn" MouseEnter="btn_MouseEnter_1">
    <Button.Template>
    <ControlTemplate TargetType="Button">
    <StackPanel Width="43">
    <Image Name="btnS" Source="Resources/main.png" />
    </StackPanel>
    <ControlTemplate.Triggers>
    <MultiTrigger>
    <MultiTrigger.Conditions>
    <Condition Property="IsMouseOver" Value="True" />
    <Condition Property="IsEnabled" Value="True" />
    </MultiTrigger.Conditions>
    <MultiTrigger.Setters>
    <Setter TargetName="btnS" Property="Source" Value="Resources/hover.png"></Setter>
    </MultiTrigger.Setters>
    </MultiTrigger>
    <MultiTrigger>
    <MultiTrigger.Conditions>
    <Condition Property="IsPressed" Value="True" />
    <Condition Property="IsEnabled" Value="True" />
    </MultiTrigger.Conditions>
    <MultiTrigger.Setters>
    <Setter TargetName="btnS" Property="Source" Value="Resources/audio-push.png" />
    </MultiTrigger.Setters>
    </MultiTrigger>
    <Trigger Property="IsEnabled" Value="false">
    <Setter TargetName="btnS" Property="Source" Value="/Resources/disabled.png" />
    </Trigger>
    </ControlTemplate.Triggers>
    </ControlTemplate>
    </Button.Template>
    </Button>
    I want to change the source of btnS at run time bases on condition.
    Suppose that if a = 1 then 
    btnS source is "Resources/main.png" this
    else btnS source should be "Resources/main1.png"
    same for mouse hover and enable disable triggers.
    Thanks,

    Hi Sumit,
    We can use
    VisualTreeHelper class to find Image control in visual tree.
    UIHelper.cs:
    public class UIHelper
    public static T FindChild<T>(DependencyObject parent, string childName)
    where T : DependencyObject
    // Confirm parent and childName are valid.
    if (parent == null) return null;
    T foundChild = null;
    int childrenCount = VisualTreeHelper.GetChildrenCount(parent);
    for (int i = 0; i < childrenCount; i++)
    var child = VisualTreeHelper.GetChild(parent, i);
    // If the child is not of the request child type child
    T childType = child as T;
    if (childType == null)
    // recursively drill down the tree
    foundChild = FindChild<T>(child, childName);
    // If the child is found, break so we do not overwrite the found child.
    if (foundChild != null) break;
    else if (!string.IsNullOrEmpty(childName))
    var frameworkElement = child as FrameworkElement;
    // If the child's name is set for search
    if (frameworkElement != null && frameworkElement.Name == childName)
    // if the child's name is of the request name
    foundChild = (T)child;
    break;
    else
    // child element found.
    foundChild = (T)child;
    break;
    return foundChild;
    Code Behind:
    private void Button_Click(object sender, RoutedEventArgs e)
    Image image1 = UIHelper.FindChild<Image>(btn, "btnS");
    if(image1!=null)
    image1.Source = new BitmapImage(
    new Uri("Resources/main1.png", UriKind.Relative)
    Screenshot:
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Run time error while saving sales order

    Hi all,
    i am working on IDES ECC 6.0, when i am saving an sales order(OR) i am getting run time error in the table CRMPAROLTP, program SAPMV45A.
    i am using 4 GB RAM, still having a space of 30 GB for only IDES to save the data.
    so, how to solve it.

    Hello,
    I doubt the runtime error (I am assuming you mean that you got a short dump) you mentioned in your original post has anything to do with the warning messages you see when doing a check (Ctrl+F2) on table CRMPAROLTP and program SAPMV45A.  These warnings should not cause a short dump or runtime error.
    The warning message for the table has the following long text:
    Table CRMPAROLTP: Key length > 120 (Restricted functionality)
    Message no. DT214
    Diagnosis
    The key length, i.e. the sum of the field lengths of all the key fields of the table, is more than 120 bytes.
    System response
    This is a warning.
    Procedure
    Note the following restricted fuctionality for this table:
    - Table contents cannot be transported by specifying key values, at
      best by specifying generic key values with a maximum length of 120
      bytes.
    - The table may not be used as the base table of a lock object.
    The warnings in SE38 for program SAPMV45A are mostly related to Unicode and have no reference to the table CRMPAROLTP.
    If you haven't already done so, please check the SAP Note referenced in my first reply since this does provide a solution for short dumps related to table CRMPAROLTP.
    Of course, since I don't know specifically what the short dump message is that you received, I could be basing my assessment on false assumptions.  If you have those details it is better for the SDN community as a whole if you include the information in this thread instead of sending it to me offline.
    Best Regards,
    Jamie

  • Run time Error while executing project infosystem reports (CN41/41N)

    Hi,
    I would like to inform while running project infosystems reports (CN41/41N / cns41 etc), it is taking long time & most of the time run time errors are coming. I observed due to more objects in projects, run time error is coming. Request you to suggest to fix the issue.
    Thank you for your cooperation.
    Regards,
    Rakesh Pradhan

    Hi Rakesh,
    The memory which can be managed by the logical database is approx.       
    100 MB. You can use the following rule of thumb to calculate the         
    allocated memory of your selection:                                                                               
    [(  sum of projectdefinitions + sum of WBS elements + sum of networks and orders ) * 1 KB  + ( sum of activities     ) * 4 KB ] *2,5 = memory consumption                                                                               
    Further objects - as relationships, capacities, ... will increase        
    the memory consumption. (see note 107605) 
    You can find out the number of objects bein used using the "Test selection scope" (CTRL+F12) button in CN41                                                                               
    Other recommendations are:                                                                               
    1) Check the profile (parameter "rdisp/PG_MAXFS") with your Basis        
       colleague and adjust upwards (Note 133909)                                                                               
    2) Select a smaller range of objects by using status schema              
       or more dynamic selections. Please review SAP Note 206264.                                                                               
    3) Please review also 107605, which gives you further information 
       concerning the selection in Project Information System.                                                                               
    Hope this helps!
    Regards
    Martina
    Message was edited by:
            Martina Modolell

  • Run time column attach to apex report

    Hello everyone,
    can it be possible to make a function in a apex which will return a column value in report, like wise we use in report builder. I know we can do this directly in report query... however i want to make a some process may be, through which i can get a column value.
    My requirement is.... i am having a PO report where columns are Header_id, Segment1, Vendor_id, Vendor_site n Amount.
    I can have every column data from PO_header_all except amount for which i need to use.. PO_lines_all whose would be depend on header_id.
    Now.. i can do this directly in query.. but here i don't want to.. use a po_lines_all in report query. I want to call the Amount column attach at run time to report.
    Pls tell me how can i do this??
    I don't know whether it is possible or not... if it is then how can i do this.
    Regards,
    UKJ

    Hi,
    Do you mean something like:
    SELECT H.HEADER_ID, H.SEGMENT1, H.VENDOR_ID, H.VENDOR_SITE, SUM(A.AMOUNT) TOTAL_AMOUNT
    FROM PO_HEADER_ALL H
    LEFT OUTER JOIN PO_LINES_ALL A ON H.HEADER_ID = A.HEADER_ID
    GROUP BY H.HEADER_ID, H.SEGMENT1, H.VENDOR_ID, H.VENDOR_SITEThis will return the header_id, segment1, vendor_id and vendor_site values from po_header_all and a total of amount from po_lines_all
    Andy

  • Custom component property value handling at run time

    I would like to develop simple custom component which has three properties PROP1, PROP2 & RESULT . These parameters are bound to excel sheet cells as follows..
    cell A1 connected to PROP1
    cell A2 connected to PROP2 and
    cell A3 connected to RESULT.
    In excel A1 cell has excel formula set as =IF(A2<5,10,0).
    Custom component would be simple button display at runtime and on click of the same, I would like to perform following actions in sequence with N number of times.
    1. First push any random number to PROP2. (which is simple task, I believe)
    2. Pick new value of PROP1 which is changed due to existance of excel formula (+ using dispatchevent I could able to pass value to excel cell A2. But not able to read new value of PROP1+)
    3. check new PROP1 value equal to 10. If it is 10 then count it otherwise again push new random value to PROP2.
    4. Continue step 1 to 3 till N number of times. and finally
    4. Push number of counts for PROP1 value 10 to RESULT parameter.
    All the parameters are bindable (getter/setter with [Bindable]) in Flex component application and flex propertysheet application use binding ID to bind with cell address. with binding direction BOTH and SINGLETON
    Here is flex function code which triggered at button click.
    public function test002():void {
    while ( N < 100)
      this.PROP2 = Math.round(Math.random()*1000);
      dispatchEvent(new PropertyChangeEvent(PropertyChangeEvent.PROPERTY_CHANGE, false, false, PropertyChangeEventKind.UPDATE, "PROP2", null, PROP2, this));
         if (this.PROP1 == 10)
          cnt++;
       this.RESULT = cnt;
    My observations are as follows.
    - new push of value to PROP2 get reflected to excel A2 when button click event is over, not at the time of while loop process execution.
    - Also I observed PROP1 value never changes and it is the value which is recorded just before button click event of component at run time and remain the same till button click event is over.
    - Further to this I notice as click event is over, new value of PROP2 reflected in cell A2 and change value (if it passes IF formula of excel ) in A1 as well. Next button click action takes these new A1 and A2 values in consideration and process the function "test002".
    I would like to understand possibility of custom component event execution process, which can able to pass as well as read value from component parameters to underlying excel with changes due to excel formula existance.  If it is not limitations (If so) what is the set of commands which can be helpful to achieve this. I appreciate if anybody explain typical event execution required in such scenarios with some actionscript code directions.
    Thanks
    Sandesh
    Edited by: Sandesh Darne on Feb 8, 2010 11:48 AM
    Edited by: Sandesh Darne on Feb 10, 2010 5:23 AM

    Marton,
    I have tried your solution. It works well immediately after xcelsius dashboard get displayed or preview. It does not wait click event to happen. So I modified further by adding one switch ( "switch001" in code piece shown below) to control iteration by click event. That stops running of iteration immediate after dashboard display.
    In order to see iteration I have to click twice on button. First click does send "frm" parameter value to excel and excel formula operates. The excel formula result send back to component via SETTER of "frmResult" . But it stops over there. If I click second time the iteration starts for 100 times.
    Also I try to export this to PDF. PDF file get generated. If I try to open PDF file it raise error.
    My code is attached here.
    "frm" is the parameter that sends random number to excel.
    "frmResult" parameter receives excel formula output and send it back to component.
    "test()" function operate on button click event and set switch001 and then calls "Calc" function for iterations.
    MXML code..........
      <mx:VBox>
           <mx:TextInput id="frmResultLabel" width="100" />
           <mx:Button label="test..." click="test()"/>
      </mx:VBox>
    Actionscript code
    public var cnt:int;
              public var N:int = 0;
              public var sum:int = 0;
              public var switch001:Boolean = false;
             public function test():void {
                   N = 0;
                   sum = 0;
                   switch001 = true;
              public function Calc():void {
              if (switch001 == true)
                if (N < 100)
                    this.frm = Math.round(Math.random() * 1000);
                else if (N == 100)  // return the result
                     this.frmResult = sum;
                     // Label component use to display frm and frmResult values at runtime
                     frmResultLabel.text = sum.toString() + ">" + this.frm + ">" + this.frmResult;
                 N++;
              [Bindable]
              private var _frm:int;
              private var _frmChanged:Boolean = true;
              [Bindable]
              public function get frm():int
                   return _frm;
              public function set frm(value:int):void
                   //if (value == null)  value = 0;
                   if (_frm != value)
                        _frm = value;
                        _frmChanged = true;
                        invalidateProperties();
              override protected function commitProperties():void
                 super.commitProperties();
                 if (_frmResultChanged == true)
                        // start the cycle again by generating a new random number,
                        // or write out the result
                        Calc();

  • Load a variable at run time

    I have the following code to load in some images and
    display/move them:
    this.createClassObject(mx.controls.Loader, "myLoader", 1);
    this.createClassObject(mx.controls.Loader, "myLoader2", 2);
    this.createClassObject(mx.controls.Loader, "myLoader3", 3);
    this.createClassObject(mx.controls.Loader, "myLoader4", 4);
    this.createClassObject(mx.controls.Loader, "myLoader5", 5);
    myLoader.scaleContent = false;
    myLoader2.scaleContent = false;
    myLoader3.scaleContent = false;
    myLoader4.scaleContent = false;
    myLoader5.scaleContent = false;
    var images:Array = ["
    http://www.mysite.com/images/image_01.jpg",
    http://www.mysite.com/images/image_01.jpg",
    http://www.mysite.com/images/image_01.jpg",
    http://www.mysite.com/images/image_01.jpg",
    http://www.mysite.com/images/image_01.jpg"
    myLoader.contentPath = images[0];
    myLoader._x = 0;
    myLoader._y = 0;
    myLoader2.contentPath = images[1];
    myLoader2._x = 320;
    myLoader2._y = 0;
    myLoader3.contentPath = images[2];
    myLoader3._x = 640;
    myLoader3._y = 0;
    myLoader4.contentPath = images[3];
    myLoader4._x = 960;
    myLoader4._y = 0;
    myLoader5.contentPath = images[4];
    myLoader5._x = 1280;
    myLoader5._y = 0;
    This works great, but what I'm wondering is, can I load in
    the images array variable at run time from an external file so I
    could edit that file on the server in order to change images,
    without having to re-publish the flash file? Thanks for any help.
    Bob

    Adrian,
    Have a look at: http://www.oracle.com/technology/products/database/htmldb/howtos/howto_create_upload_spreadsheet_form.html
    It's not 100% what you're looking for (as it requires you to cut & paste from the spreadsheet), but it may do what you're after.
    Thanks,
    - Scott -

  • Open GRPO run time correct report

    Query expert,
    We are using SAP B1 9.0
    We need Open GRPO Report run time query
    Example - We made GRPO on 01/09/14 with 5 line items after that we made A/P Invoice on 05/09/14 with 3 line items
    If we generate open GRPO report as on 05/09/14 than GRPO showing Open for 2 line item but next date we made again rest 2 line item A/P Invoice
    on 08/09/14
    Finally after few date we want to generate how many open GRPO as on 05/09/14 than 2 line item data not showing in Open GRPO list but actual 2 line item closes on 08/09/14.
    Please help how to made such run time query so that we get correct open GRPO report from SAP.
    Thanks
    Regards
    Mukesh Singh

    Hi,
    Try this,
    /*select from opch a */
    Declare @tilldat Datetime
    /* where */
    set @tilldat=/* a.Docdate  */'[%0]'
    SELECT A.DocNum,A.DocDate,B.ItemCode,B.Dscription,B.Quantity,
    CASE WHEN B.Quantity - ISNULL(C.Qty,0)=0 THEN 'Closed' else 'Open' End LineStatus,c.Docdate 'InvoiceDat'
    FROM OPDN A INNER JOIN PDN1 B ON A.DocEntry=B.DocEntry
    LEFT OUTER JOIN
    (SELECT SUM(B.Quantity) Qty,B.BaseEntry,B.BaseLine,Max(A.DocDate) Docdate
    FROM OPCH A INNER JOIN PCH1 B ON A.DocEntry=B.DocEntry WHERE A.DocType='I' AND B.BaseType='20'
    GROUP BY B.BaseEntry,B.BaseLine) C ON C.BaseEntry=B.DocEntry AND C.BaseLine=B.LineNum
    WHERE A.DocType='I' AND ISNULL(C.Docdate,@tilldat)<=@tilldat
    Thanks & Regards,
    Silambu

  • Standard Run Time Errors

    Hello All,
    With regard to Standard Run Time errors, say SUM_OVERFLOW, where do we get the documentation about this error(as well as erors of this type)
    1. Dump analysis ST21 and the other that strikes me is the 2. OSS
    Do correct me if i am wrong and please provide me further information.
    TQ
    - Sravan

    Hi,
    the ABAP keyword documentation offers a full text search.
    If you enter SUM_OVERFLOW, you learn that this exception is raised from the SUM statement in a loop over an internal table.
    Regards,
    Horst

  • To optimize query run-time

    Hi,
    I have an sql query that access a single table which contains approx. 10 million records. The table has 4 columns (there are no indexes defined for the columns), which are 'new_id', 'time', 'access_code' and 'graph_qty'. With time being defined in 'dd-mm-yyyy hh:mm:ss'. The idea is to scan the table to retrieve records whose 'time' and whose 'access_code' match with the condition in the where-clause and then de-normalize these records based on the 'access_code'. The resultant set would have records wherein 'access_code' is denormalized into columns, with each 'access_code' having a unique column.
    The query runs for about 30mins.
    /* '&¤t_date' is a pre-defined variable containing a date (assume sysdate)*/
    SELECT
    new_id
    , trunc(time) AS time
    , SUM(CASE WHEN access_code = '100' THEN graph_qty END ) AS graph_1
    , SUM(CASE WHEN access_code = '200' THEN graph_qty END ) AS graph_2
    , SUM(CASE WHEN access_code = '300' THEN graph_qty END ) AS graph_3
    , SUM(CASE WHEN access_code = '400' THEN graph_qty END ) AS graph_4
    , SUM(CASE WHEN access_code = '500' THEN graph_qty END ) AS graph_5
    , SUM(CASE WHEN access_code = '600' THEN graph_qty END ) AS graph_6
    , SUM(CASE WHEN access_code = '700' THEN graph_qty END ) AS graph_7
    , SUM(CASE WHEN access_code = '800' THEN graph_qty END ) AS graph_8
    , SUM(CASE WHEN access_code = '900' THEN graph_qty END ) AS graph_9
    , SUM(CASE WHEN access_code = '1000' THEN graph_qty END ) AS graph_10
    FROM
    dummy_table
    WHERE trunc(time) IN ( '&¤t_date'
    , ADD_MONTHS('&¤t_date',-1)
    , ADD_MONTHS('&¤t_date',-3)
    , ADD_MONTHS('&¤t_date',-6)
    , ADD_MONTHS('&¤t_date',-12)
    , ADD_MONTHS('&¤t_date',-13)
    , ADD_MONTHS('&¤t_date',-15)
    , ADD_MONTHS('&¤t_date',-18)
    , ADD_MONTHS('&¤t_date',-24)
    AND access_code IN ('100','200','300','400','500','600','700','800','900','1000')
    GROUP BY
    new_id
    , time
    Please suggest ways to reduce the qry run-time.
    Thanks,
    kartik

    does this 20min include the time to display the data?
    how long much does it take to execute the following queries?
    select /*+ full(t) */ count(*) from dummy_table t;
    select count(*) from(
    SELECT
    new_id
    , trunc(time) AS time
    , SUM(CASE WHEN access_code = '100' THEN graph_qty END ) AS graph_1
    , SUM(CASE WHEN access_code = '200' THEN graph_qty END ) AS graph_2
    , SUM(CASE WHEN access_code = '300' THEN graph_qty END ) AS graph_3
    , SUM(CASE WHEN access_code = '400' THEN graph_qty END ) AS graph_4
    , SUM(CASE WHEN access_code = '500' THEN graph_qty END ) AS graph_5
    , SUM(CASE WHEN access_code = '600' THEN graph_qty END ) AS graph_6
    , SUM(CASE WHEN access_code = '700' THEN graph_qty END ) AS graph_7
    , SUM(CASE WHEN access_code = '800' THEN graph_qty END ) AS graph_8
    , SUM(CASE WHEN access_code = '900' THEN graph_qty END ) AS graph_9
    , SUM(CASE WHEN access_code = '1000' THEN graph_qty END ) AS graph_10
    FROM
    dummy_table
    WHERE trunc(time) IN ( '&¤t_date'
    , ADD_MONTHS('&¤t_date',-1)
    , ADD_MONTHS('&¤t_date',-3)
    , ADD_MONTHS('&¤t_date',-6)
    , ADD_MONTHS('&¤t_date',-12)
    , ADD_MONTHS('&¤t_date',-13)
    , ADD_MONTHS('&¤t_date',-15)
    , ADD_MONTHS('&¤t_date',-18)
    , ADD_MONTHS('&¤t_date',-24)
    AND access_code IN ('100','200','300','400','500','600','700','800','900','1000')
    select count(*) from(
    SELECT
    new_id
    , trunc(time) AS time
    , SUM(CASE WHEN access_code = '100' THEN graph_qty END ) AS graph_1
    , SUM(CASE WHEN access_code = '200' THEN graph_qty END ) AS graph_2
    , SUM(CASE WHEN access_code = '300' THEN graph_qty END ) AS graph_3
    , SUM(CASE WHEN access_code = '400' THEN graph_qty END ) AS graph_4
    , SUM(CASE WHEN access_code = '500' THEN graph_qty END ) AS graph_5
    , SUM(CASE WHEN access_code = '600' THEN graph_qty END ) AS graph_6
    , SUM(CASE WHEN access_code = '700' THEN graph_qty END ) AS graph_7
    , SUM(CASE WHEN access_code = '800' THEN graph_qty END ) AS graph_8
    , SUM(CASE WHEN access_code = '900' THEN graph_qty END ) AS graph_9
    , SUM(CASE WHEN access_code = '1000' THEN graph_qty END ) AS graph_10
    FROM
    dummy_table
    WHERE trunc(time) IN ( '&¤t_date'
    , ADD_MONTHS('&¤t_date',-1)
    , ADD_MONTHS('&¤t_date',-3)
    , ADD_MONTHS('&¤t_date',-6)
    , ADD_MONTHS('&¤t_date',-12)
    , ADD_MONTHS('&¤t_date',-13)
    , ADD_MONTHS('&¤t_date',-15)
    , ADD_MONTHS('&¤t_date',-18)
    , ADD_MONTHS('&¤t_date',-24)
    AND access_code IN ('100','200','300','400','500','600','700','800','900','1000')
    GROUP BY
    new_id
    , time

  • A run-time-error ,how to solve it

    I write a function to return a float64 type pointer and  assign the pointer to my defined Pionter "newdata" in  my StartCallBack,there's no error,but when I USE  "
    DAQmxWriteAnalogF64 (gtaskhandle0, leng[0]<=leng[1]?2*leng[0]:2*leng[1], 0, 10.0, DAQmx_Val_GroupByScanNumber, newdata, &written, NULL);",
    I get a run-time-error like this : "work.c", line 231, col 121, thread id 0x00007FB4:   Array argument too small (40000000 bytes).  Argument must contain at least 80000000 bytes (10000000 elements).Why this happen?
    My part code:
       DAQmxCreateTask ("", &gtaskhandle0);
       DAQmxCreateAOVoltageChan (gtaskhandle0, "Dev1/ao0:1", "", -10.0, 10.0, DAQmx_Val_Volts, "");
       DAQmxSetTimingAttribute(gtaskhandle0,DAQmx_SampClk_Rate,1000/looptime);
       DAQmxCfgSampClkTiming(gtaskhandle0,"",1000/looptime,DAQmx_Val_Rising,DAQmx_Val_FiniteSamps,leng[0]+leng[1]);
       DAQmxRegisterDoneEvent(gtaskhandle0,0,DoneCallback,NULL);
       DAQmxWriteAnalogF64 (gtaskhandle0, leng[0]<=leng[1]?2*leng[0]:2*leng[1], 0, 10.0, DAQmx_Val_GroupByChannel, newdata, &written, NULL);
       SetCtrlAttribute (panelHandle, PANEL_REALWRITE, ATTR_CTRL_VAL, (double)written);
       DAQmxStartTask(gtaskhandle0);
    Solved!
    Go to Solution.

    I do not think so ,when  I modificate the channel from "Dev1/ao0:1" to "Dev1/ao0",it works normally ,but I can output only in one AO channel by this way ,rather than in two AO channels.
    float64 * volarray(double ti[],double vi[],int num,int len,double looptime)
      int k=0,sum=0,m=0;
      float64 *p=NULL;
      p=(float64 *) malloc(sizeof(double)*len);
      for(k=0;k<num-1
       if(ti[k]<ti[k+1])
        {for(m=0;m<(int) (ti[k+1]-ti[k])/looptime;m++)
         p[m+sum]= vi[k]+m*(vi[k+1]-vi[k])/((ti[k+1]-ti[k])/looptime);
           sum+= (int) (ti[k+1]-ti[k])/looptime ;
        k+=1;
       else
        {for(m=0;m<(int) (ti[k+2]-ti[k+1])/looptime;m++) 
         p[m+sum]= vi[k+1]+m*(vi[k+2]-vi[k+1])/((ti[k+2]-ti[k+1])/looptime);
        sum+= (int) (ti[k+2]-ti[k+1])/looptime ;
        k+=2;
       return p;}
    float64 * JointVol( float64 *data0, float64 *data1, int len0, int len1 )
    {  int i=0;
       int totalLen=0;
       float64 * P=NULL;
       if(len0<=len1)
        totalLen=2*len0;
       else
           totalLen=2*len1;
       //totalLen=((len0<=len1)?len0:len1)*2;
       P=(float64*)malloc(sizeof(double)*totalLen);
       for(i=0;i<(totalLen/2);++i) 
       P[2*i]=*(data0+i);
       P[2*i+1]=*(data1+i);
    return P; 

Maybe you are looking for