Problem while looping through record set and tem table for matching data

hi I am using one record set and ane temp table and looping through both to find the match between dates.
If date matches then it shud do some processing otherwise it will return default values(null values).
FOR i IN student_rec .FIRST..student_rec .LAST          /*student_rec.school_date has 01-MAR-2012,02-MAR-2012,03-MAR-2012,04-MAR-2012,05-MAR-2012*/
LOOP
l_return_out.school_date := student_rec(i).school_date;
l_return_out.marks_obtained := student_rec(i).marks_obtained;
FOR i IN selected_dates .FIRST..selected_dates .LAST          /*selected_dates has 02-MAR-2012,03-MAR-2012,05-MAR-2012*/
LOOP
DBMS_OUTPUT.PUT_LINE(selected_dates(i));
IF selected_dates(i)=student_rec(i).sett_date
THEN
EXIT;
end if;
     ---------call procedure P1
-----------get output as ret_val1               /*getting ret_val1 as 10 for 02-MAR-2012,03-MAR-2012,05-MAR-2012 */
     ----------call procedure P2
---------get ouput as ret_val2               /*getting ret_val1 as 20 for 02-MAR-2012,03-MAR-2012,05-MAR-2012 */
if ret_val1>0 0r ret_val2>0
then
l_return_out.has_csts := yes;
l_return_out.cst_present := 10;
l_return_out.cst_absent := 20;
else
l_return_out.has_csts :=No;
l_return_out.cst_present:= 0;
l_return_out.cst_absent := 0;
end if;
end loop;
l_return_out.has_cst := student_rec(i).has_csts;
l_return_out.cst_missing := student_rec(i).cst_present;
l_return_out.cst_existing := student_rec(i).cst_absent;
PIPE ROW(l_return_out);
END LOOP;
RETURN ;
I am expecting this as result
school_date     marks_obtained     has_csts     cst_present cst_absent
01-MAR-2012     20          
02-MAR-2012     30          yes 10          20
03-MAR-2012     40           yes 10          20
04-MAR-2012     70          
05-MAR-2012     60          yes 10          20
but this as result
school_date     marks_obtained     has_csts     cst_present cst_absent
01-MAR-2012     20          
02-MAR-2012     30          
03-MAR-2012     40           
04-MAR-2012     70          
05-MAR-2012     60          
Can anybody please highlight the mistake i am doing while processing the logic??
Edited by: 942390 on Jul 13, 2012 8:44 PM
Edited by: 942390 on Jul 13, 2012 8:45 PM

I am getting a set values from a record set....student_rec
and on pipelining this record set from 1st till last
i am getting this
school_date     marks_obtained     has_csts     cst_present cst_absent
01-MAR-2012     20          
02-MAR-2012     30          
03-MAR-2012     40           
04-MAR-2012     70          
05-MAR-2012     60     
so initially has_csts, cst_present and cst_absent is null for all dates.
now have a temp table of selected_dates(which contains these dates 02-MAR-2012,03-MAR-2012,05-MAR-2012)
now I am want to populate has_csts, cst_present and cst_absent with data only for those dates which is present in selected_dates temp table(02-MAR-2012,03-MAR-2012,05-MAR-2012) and that too has_csts, cst_present and cst_absent will be populated with some condition (based on the values from procedure got from P1 and P2).
so want result set to look like
school_date     marks_obtained     has_csts     cst_present cst_absent
01-MAR-2012     20          
02-MAR-2012     30          yes 10          20
03-MAR-2012     40           yes 10          20
04-MAR-2012     70          
05-MAR-2012     60          yes 10          20
so what could be the possible solution to obtained this....

Similar Messages

  • Loop through result set and delete row

    so here is what I need -
    I have a query that pulls rows from the Database through a stored procedure.(these are properties in an area)
    Before I start looping through the query, I need to check the distance between my current location and the property. If it less than 5 miles, only then should I display that property. The distance in miles will be chosen while submitting the search form.
    So is there a way to delete rows from the result set based on the criteria? Or
    Is there a better way to accomplish this? I am using the the google api to get the latitudes and longitudes. The other issue to keep in mind is the load time.
    Thanks

    You can do this the easy way or the hard way.  Depends on whether your condition that needs to be checked can be expressed in the form of a SQL where clause.  If it can, then do what BKBK suggested, and use a query of query to create a new resultset that only has the rows from the original resultset that don't meet your condition.
    If the calculation of the condition is more complex, then do a CFLOOP over the query and examine each row to see if you want to keep it or toss it.  if you want to toss it, the delete that row - there is a function in CFLIB.ORG called querydeleterow that should help you.  Or, you could just clear out the row's contents and then do the query of query as described in BKBK's post to create a new resultset that doesn't include the blank rows.

  • Extra Space coming while looping through Hash Set in JSP: URGENT

    Hi,
    I have to loop through the Hash Set in jsp, and display the contents with a comma seperated list.
    I am able to display the values withing the set, however.. after every value,
    i am getting an extra space and then a comma. How do i get rid of this extra space?
    Below is the code snippet
    <% Set tagSet = new HashSet();
         tagSet = (Set)request.getAttribute(PhotoConstants.REQ_RELATED_TAGS);     
         Iterator i = tagSet.iterator();     
         while(i.hasNext()){
         String tagName=(String)i.next();
    %>
    <a href="/outlook/photo/keywords?keywords=<%=URLEncoder.encode(tagName)%>"><%=tagName%></a>
    <%if(i.hasNext()==true){%>,<%}%>
    <%}%>
    I am getting following output:
    NY , sky , Sports & Recreation , clouds , New York City , New York
    Expected Output:
    NY, sky, Sports & Recreation, clouds, New York City, New York
    I want space after a comma, not befor comma...
    Any help is really appreciated..
    Thanks
    Deepti

    <% while(i.hasNext()) {
        String tagName=(String)i.next(); %>
        <a href="/outlook/photo/keywords?keywords=<%=URLEncoder.encode(tagName)
        %>"><%=tagName%></a><%if(i.hasNext()==true){ %>,<% } %>
    <% } %>I think this is an html whitespace thing... try moving your code around to look like what's above (ie move the end of line to inside your scriptlet tag)
    Code looks OK...

  • Problem while inserting a record to infotype 416

    Iam facing a problem while inserting a record to the infotype 416 for a personnel no using the FM 'HR_INFOTYPE_OPERATION'.I have created a FM to insert a record to the infotype 416.In that FM iam using the FM 'HR_INFOTYPE_OPERATION' to create a record for infotype 416.while executing  my FM the FM 'HR_INFOTYPE_OPERATION' is returning the return value 0.But when i check in PA30 for the infotype 416,there is no record created for that personnel no.Also in the table PA0416 the record is not get created.SO what might be the problem.can anyone please provide me help on this.
    I have attached the code of my FM for ur reference.
    FUNCTION Y_ESS_FL_ENCASH.
    DATA: G_COMPENSATION_AMOUNT LIKE PA0416-AMONT,
          G_RETURN TYPE BAPIRETURN1.
    DATA T_PA0416 LIKE P0416 OCCURS 0 WITH HEADER LINE.
    CALL FUNCTION 'HR_READ_INFOTYPE'
        EXPORTING
           TCLAS                 = 'A'
           PERNR                 = '00000014'
           INFTY                 = '0416'
         BEGDA                 = sy-datum
         ENDDA                 =  sy-datum
           BYPASS_BUFFER         = 'X'
         LEGACY_MODE           = ' '
    IMPORTING
         SUBRC                 =
          TABLES
            INFTY_TAB             = T_PA0416
    EXCEPTIONS
      INFTY_NOT_FOUND       = 1
      OTHERS                = 2
        LOOP AT T_PA0416
        WHERE SUBTY = '1002'.
        ENDLOOP.
        IF SY-SUBRC <> 0.
          CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'
            EXPORTING
               NUMBER = '00000014'
            IMPORTING
               RETURN = G_RETURN.
          IF SY-SUBRC <> 0.
             MESSAGE I016(RP) WITH ' RECORD IS ALREADY LOCKED'.
          ENDIF.
          T_PA0416-PERNR = '00000014'.
          T_PA0416-SUBTY = '1002'.
          T_PA0416-INFTY = '0416'.
          T_PA0416-OBJPS = ''.
          T_PA0416-SPRPS = ''.
          T_PA0416-SEQNR = ''.
          T_PA0416-AEDTM = SY-DATUM.
          T_PA0416-UNAME = SY-UNAME.
          T_PA0416-ENDDA = SY-DATUM.
          T_PA0416-BEGDA = SY-DATUM.
          T_PA0416-NUMBR = '10'.
          T_PA0416-WGTYP = '1530'.
          T_PA0416-AMONT = '15000'.
          T_PA0416-WAERS = 'INR'.
          T_PA0416-QUONR = '1'.
          APPEND T_PA0416.
          CALL FUNCTION 'HR_INFOTYPE_OPERATION'
            EXPORTING
              INFTY                  = '0416'
              NUMBER                 = '00000014'
              SUBTYPE                = '1002'
      OBJECTID               =
      LOCKINDICATOR          =
             VALIDITYEND            = '31129999'
             VALIDITYBEGIN          = SY-DATUM
            RECORDNUMBER           = ''
              RECORD                 = T_PA0416
              OPERATION              = 'INS'
              TCLAS                  = 'A'
      DIALOG_MODE            = '0'
            NOCOMMIT               = 'X'
      VIEW_IDENTIFIER        =
      SECONDARY_RECORD       =
            IMPORTING
              RETURN                 = G_RETURN.
      KEY                    =
          IF G_RETURN+0(1) EQ 'E'.
                  MESSAGE I086(ZHR) WITH 'Record is not inserted in IT416'.
          ELSE.
              COMMIT WORK.
          ENDIF.
          CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE'
            EXPORTING
              NUMBER = '00000014'
            IMPORTING
              RETURN = G_RETURN.
        ENDIF.
    ENDFUNCTION.

    Hi Murthy
    With a first glance, I think you have given a wrong parameter value to "validityend". It should be '99991231' not '31129999' .
    If your problem still persists, try inserting the data online from PA30. If your input causes no errors, then please state what the return parameter contains.
    Regards
    *--Serdar <a href="https://www.sdn.sap.com:443http://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.sdn.businesscard.sdnbusinesscard?u=qbk%2bsag%2bjiw%3d">[ BC ]</a>

  • Loop through all layers and sublayers

    is there a way that I can loop through all layers and sublayers looking for a name of a layer? I have one that loops through only top level layers. I am thinking I have to somehow incorperate all pathItems, groupItems and the like to incorperate all types of "layers" there might be, since a group is technically not a layer but a groupItem.
    this is what I am doing so far:
    for (var i = 0; i < numberOfLayers; i++) {
        var customName = "div structure";
        var myLayer = app.activeDocument.layers[i];
        var myLayer = myLayer.name;
        alert(myLayer);
        //alert (myLayer);
        if (customName == myLayer) {
            alert("layer matches");
        else { break; }
    any ideas?

    Sorry I don't understand what it is you are trying to achieve… Most collections offer a getByName() method if you know what you are looking for eg…
    doc.layers.getByName( 'fluff' );
    This should return you the first found or error so you need to try & catch when using this…

  • I have a for loop inside of while loop.when i press stop for while loop, i also would like to stop for loop.how can i solve this problem?thanks

    i have a for loop inside of while loop.when i press stop for while loop, i also would like to stop for loop.how can i solve this problem?thanks

    Hi fais,
    Following through with what JB suggested. The steps involved in replacing the inner for loop with a while loop are outlined below.
    You can replace the inner for loop with a while by doing the following.
    1) Right-click of the for loop and select "Repalce" then navigate to the "while loop".
    2) Make sure the tunnels you where indexing on with the for loop are still indexing.
    3) Drop an "array size" node on your diagram. Wire the array that determines the number of iterations your for loop executes into this "array size".
    4) Wire the output of the array size into the new while loop.
    5) Set the condition terminal to "stop if true".
    6)Drop an "OR" gate inside the while loop and wire its output to the while loops condition terminal.
    7) C
    reate a local of the boolean "stop" button, and wire it into one of the inputs of your OR gate. This will allow you to stop the inner loop.
    8) Drop a "less than" node inside the inner while loop.
    9) Wire your iteration count into the bottom input of the "less than".
    10) Wire the count (see step 4 above) into the top input of the less than. This will stop the inner loop when ever the inner loop has processed the last element of your array.
    Provided I have not mixed up my tops and bottoms this should accomplish the replacement.
    I will let others explain how to takle this task using the "case solution".
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • How to Loop through another list and update a column with SharePoint Designer 2013 Workflow

    Hi,
    I am trying to get my head around the new 2013 Workflow Engine and SharePoint Designer 2013 Workflow Text-Based Designer.
    I have two lists.
    List A has 2 columns: Title, Completed (Yes/No)
    List B has 3 columns: Title, LookupListATitle, Completed (Yes/No)
    All the 2013 Workflow components have been installed and configured and I am selecting the 2013 Workflow option in SPD
    I am trying to set off a 2013 Workflow when an item in List A is edited to Loop through List B and select items where the LookupListATitle column's value is equal to the Title value of the current item, and set the value of the Completed column for those
    items in ListB to "Yes".
    I have the Workflow configured like this:
    Stage: Stage 1
    IF Current Item:Completed equals Yes
    Loop: 1
    The contents of this loop will run repeatedly while: ListB:LookupListATitle equals Current Item: Title
    Update item in ListB. 
    (The dialog options for the update item action as follows:
    List: ListB
    Field: Completed, Value: Yes
    In the Find the List Item section
    Field: LookupListATitle
    Value: Current Item: Title)
    Transition to stage
    Go to End of Workflow
    When I update an item in ListA and set its Completed column to Yes, I would expect the Workflow to find all the items in List B where the Lookup column is equal to ListA's Title (there are 2) and update their Completed column to Yes. But it doesn't work.
    When I look at the Workflow Status it says the Internal Status is "Canceled" and the information pop up has the following alien language (and may be truncated):
    RequestorId: 95f03b62-8956-ac14-c5cf-dc98c89c589c. Details: System.ArgumentException: Invalid JSON primitive: Item001. Parameter name: value at Microsoft.Workflow.Common.Json.JXmlToJsonValueConverter.ConvertStringToJsonNumber(String value) at Microsoft.Workflow.Common.Json.JXmlToJsonValueConverter.ReadPrimitive(String
    type, XmlDictionaryReader jsonReader) at Microsoft.Workflow.Common.Json.JXmlToJsonValueConverter.JXMLToJsonValue(XmlDictionaryReader jsonReader) at Microsoft.Workflow.Common.Json.JXmlToJsonValueConverter.JXMLToJsonValue(Stream jsonStream, Byte[] jsonBytes)
    at Microsoft.Activities.DynamicValue.ParseJson(String json) at System.Activities.CodeActivity`1.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager) at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor
    executor, BookmarkManager bookmarkManager, Location resultLocation)
    Unfortunately I don't have access to the server, logs etc.
    I would love to find some tutorials, or any books on SharePoint Designer 2013 in general and Workflows in particular but my searches haven't turned up much so far apart from a pre-release Beginning SharePoint Workflows which is in its very early stages and
    not much help yet.
    Can anyone give me some guidance on how to set up While Loops to iterate through a related list using SharePoint Designer 2013?
    Mark

    Hi,
    I understand that you wanted to update the items in the other list (Participants) where the Course equals the Current Item.
    You need to use “Call HTTP Web Service" action and “Build Dictionary" action to get the Maxid and then loop Participants to update the items.
    You can follow the steps as below to achieve what you want:
    Create a custom list named Courses, add columns: Title(Single line of text), Course ID(Single line of text), Course Finalised (Yes/No).
    Create a custom list named Participants, add columns: Title(Single line of text), Course(Lookup), CourseFinalised (Yes/No).
    Create workflow associated to Courses, start the workflow automatically when an item is created or changed.
    Add conditions and actions:
    The HTTP URL is set to
    https://sitename/_api/web/lists/GetByTitle('listname')/items?$orderby=Id%20desc and the HTTP method is set to “GET”. Then the list will be order by Id and desc.
    Then if Course Finalised is equal to Yes, the CourseFinalised  of the associated items in Participants will be updated to Yes.
    More information:
    http://sergeluca.wordpress.com/2013/04/09/calling-the-sharepoint-2013-rest-api-from-a-sharepoint-designer-workflow/
    Thank you for your understanding.
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • Looping through result set

    Hello, I am experience a heapdump while looping through a result set from a query I amr unning.
    Our system creates an instance of a transfer object representing one row in the result set for each row as it loops through. The result set brings back 36000 rows, so it is creating 36000 objects. As a result, a heapdump is occurring. What can be done to fix this error?

    even if it holds 360000 rows,
    I still think [zadok] idea is a great idea.
    you can get, for example first 1000 rows, cacluate it save result, and then get the next 1000 rows, is it make sense?
    if you still want to get it by one time, extend your vm mem, normal setting is 64M(I am not sure)

  • Calculations while looping through dataset

    Hi
    I've just started using spry which I'm really enjoying. It's
    a really great and powerful framework.
    I have been able to display a dynamic region and its content
    looping through the rows of the dataset.
    My problem now is that according to the data in the data set,
    I have to make some calculations for each row. I can't seem to find
    a way to do it, and don't actually know if it is possible.
    this is how my xml looks like:
    var xmlStr = "<?xml version=\"1.0\"
    encoding=\"iso-8859-1\"?> \
    <portfolios> \
    <portfolio id=\"12345\"> \
    <portfolio_name>Test1</portfolio_name> \
    <investment>500000.0000</investment> \
    <current_value>513475.7260</current_value> \
    </portfolio> \
    <portfolio id=\"67890\"> \
    <name>Test2</portfolio_name> \
    <investment>100000.0000</investment> \
    <current_value>103574.6610</current_value> \
    </portfolio> \
    </portfolios>";
    var dsPortfolios = new Spry.Data.XMLDataSet(null,
    "/portfolios/portfolio");
    var xmlDOMDocument = Spry.Utils.stringToXMLDoc(xmlStr);
    dsPortfolios.setDataFromDoc(xmlDOMDocument);
    and the display for the data set:
    <div spry:region="dsPortfolios"
    class="SpryHiddenRegion">
    <table>
    <tr><th>Name</th><th>Investment</th><th>Current
    Value</th><th>Gain</th><th">Pct
    Gain</th</tr>
    <tr spry:repeat="dsPortfolios">
    <td>{name}</td><td>{investment}</td><td>{current_value}</td><td>GAIN_CALC</td><td>GAIN_PE RCENT</td>
    </tr>
    </table>
    </div>
    basically, where it says GAIN_CALC and GAIN_PERCENT in the
    table, these should be calculation (i.e. GAIN_CALC = current_value
    - investment and GAIN_PERCENT = ((current_value -
    investment)*100)/investment )
    can anybody help me there (if it's possible to do such things
    of course)?
    Thanks

    If you register a post load observer on your data set, you
    can perform the calculations on each row and add custom columns
    that you can then refer to from your region as data references:
    var ds = new Spry.Data.XMLDataSet("portfolios.xml",
    "/portfolios/portfolio");
    var obs = {};
    obs.onPostLoad = function(notifier, data)
    var rows = ds.getData();
    for (var i = 0; rows && i < rows.length; i++)
    var investment = parseFloat(rows[ i ][ "investment" ]);
    var currentValue = parseFloat(rows[ i ][ "current_value" ]);
    rows[ i ][ "gain_calc" ] = currentValue - investment;
    rows[ i ][ "gain_percent" ] = ((currentValue -
    investment)*100) / investment;
    ds.addObserver(obs);
    <div spry:region="dsPortfolios"
    class="SpryHiddenRegion">
    <table>
    <tr><th>Name</th><th>Investment</th><th>Current
    Value</th><th>Gain</th><th">Pct
    Gain</th</tr>
    <tr spry:repeat="dsPortfolios">
    <td>{name}</td><td>{investment}</td><td>{current_value}</td><td>{gain_calc}</td><td>{gain_ percent}</td>
    </tr>
    </table>
    </div>
    --== Kin ==--

  • How to loop through records in the block

    Hello,
    I have 2 blocks one emp_control_block and the other one based on the emp. The emp control block basically has some search critieria which is then passed onto the emp block to execute the query. However, I don't want to show any emp block data until the user presses the search button in the control block then I automatically want to make visible the EMP block and also set the width of columns. Right now, in the properties I have not assigned any Canvas to the EMP Block
    Can anyone tell me How do I loop through the block and show the items/columns in a canvas that I have already created. Any example of the code would be really appreciated. Thanks

    Monica,
    I tried your code but I get NO NAVIGABLE ITEMS IN DESTINATION BLOCK error. In the property palette for the items in the EMP block I have assigned Null as Canvas because I want to programatically assign it to the emp_stack_canvas. How do I do that? Also I want to change the item width for each column to say a fixed width of 50.
    Thanks

  • Looping through records

    New to PL/SQL and wondered if you can simply loop through records in order to ouptut as single string in a file?
    DECLARE
    v_string_rec VARCHAR(4000);
    type v_cols is record;
    BEGIN
    FOR rec IN (SELECT * FROM PLAY_OWNER.STG_CUSTOMER)
    -- somehow need to get the single record into record var then loop through that?
    LOOP
    FOR i IN v_cols.FIRST .. v_cols.LAST
    LOOP
    v_string_rec := recs(i) || v_string_rec;
    END LOOP;
    DBMS_OUPTPUT.PUT_LINE (v_string_rec);
    -- UTL_FILE operations, insert rows
    END LOOP;
    END;
    Give me a slap by all means, as I say kind of new to this

    Just as a curiosity, using some xml capabilities we can obtain a strig concatenation of all columns of a given query this way:
    SQL> with t as
      2  (select xmltype(dbms_xmlgen.getxml(DBMS_XMLGEN.newContext('SELECT * FROM emp'))) doc
      3     from dual)
      4  select extract(column_value,'//text()') myrow
      5  from t, table(xmlsequence(extract(t.doc,'/ROWSET/ROW')));
    MYROW
    7369SMITHCLERK790217-12-198080020
    7499ALLENSALESMAN769820-02-1981160030030
    7521WARDSALESMAN769822-02-1981125050030
    7566JONESMANAGER783902-04-1981297520
    7654MARTINSALESMAN769828-09-19811250140030
    7698BLAKEMANAGER783901-05-1981285030
    7782CLARKMANAGER783909-06-1981245010
    7788SCOTTANALYST756619-04-1987300020
    7839KINGPRESIDENT17-11-1981500010
    7844TURNERSALESMAN769808-09-19811500030
    7876ADAMSCLERK778823-05-1987110020
    7900JAMESCLERK769803-12-198195030
    7902FORDANALYST756603-12-1981300020
    7934MILLERCLERK778223-01-1982130010
    14 rows selected.And all the single attribute values this way:
    SQL> with t as
      2  (select xmltype(dbms_xmlgen.getxml(DBMS_XMLGEN.newContext('SELECT * FROM emp'))) doc
      3     from dual)
      4  select extract(column_value,'//text()') attribute_value
      5  from (select column_value myrow
      6          from t, table(xmlsequence(extract(t.doc,'/ROWSET/ROW')))
      7        ) r, table(xmlsequence(extract(r.myrow,'/ROW/*')));
    ATTRIBUTE_VALUE
    7369
    SMITH
    CLERK
    7902
    17-12-1980
    800
    20
    7499
    ALLEN
    SALESMAN
    7698
    20-02-1981
    1600
    300
    30
    7521
    WARD
    SALESMAN
    7698
    22-02-1981
    1250
    500
    30
    7566
    JONES
    MANAGER
    7839
    02-04-1981
    2975
    20
    7654
    MARTIN
    SALESMAN
    7698
    28-09-1981
    1250
    1400
    30
    7698
    BLAKE
    MANAGER
    7839
    01-05-1981
    2850
    30
    7782
    CLARK
    MANAGER
    7839
    09-06-1981
    2450
    10
    7788
    SCOTT
    ANALYST
    7566
    19-04-1987
    3000
    20
    7839
    KING
    PRESIDENT
    17-11-1981
    5000
    10
    7844
    TURNER
    SALESMAN
    7698
    08-09-1981
    1500
    0
    30
    7876
    ADAMS
    CLERK
    7788
    23-05-1987
    1100
    20
    7900
    JAMES
    CLERK
    7698
    03-12-1981
    950
    30
    7902
    FORD
    ANALYST
    7566
    03-12-1981
    3000
    20
    7934
    MILLER
    CLERK
    7782
    23-01-1982
    1300
    10
    101 rows selected.Max
    [My Italian Oracle blog|http://oracleitalia.wordpress.com/2010/01/23/la-forza-del-foglio-di-calcolo-in-una-query-la-clausola-model/]

  • How do I go about this? Creating table while looping through dates?

    How do I do this? Creating table while looping through dates?
    I have a table with information like:
    ID---Date---Status
    1-------04/23-----Open
    1-------04/25-----Open
    2-------04/24-----Closed
    3-------04/26-----Closed
    What I want to do is create another table based on this per ID, but have all the dates/statuses on the same line as that ID number (as additional columns). The problem is that the number of columns needed is to be dynamically decided by the number of dates.
    To illustrate my example, I'm looking to achieve the following:
    ID---04/23 Status---04/24--Status---04/25--Status---04/26--Status
    1----Open--------------<null>-------------Open---------------<null>
    2----<null>------------Closed-------------<null>-------------<null>
    3----<null>------------<null>-------------<null>-------------Closed
    What would be the best way to go about this?
    Can someone please point me in the right direction?
    Would I need to do some looping?
    Thanks in advance!

    thedunnyman wrote:
    How do I do this? Creating table while looping through dates?
    I have a table with information like:
    ID---Date---Status
    1-------04/23-----Open
    1-------04/25-----Open
    2-------04/24-----Closed
    3-------04/26-----Closed
    What I want to do is create another table based on this per ID, but have all the dates/statuses on the same line as that ID number (as additional columns). The problem is that the number of columns needed is to be dynamically decided by the number of dates.
    To illustrate my example, I'm looking to achieve the following:
    ID---04/23 Status---04/24--Status---04/25--Status---04/26--Status
    1----Open--------------<null>-------------Open---------------<null>
    2----<null>------------Closed-------------<null>-------------<null>
    3----<null>------------<null>-------------<null>-------------Closed
    What would be the best way to go about this?
    Can someone please point me in the right direction?
    Would I need to do some looping?
    Thanks in advance!I hope you are asking about writing a query to DISPLAY the data that way ... not to actually create such a massively denormalized table ....

  • Dynamic Calc processor cannot lock more than [100] ESM blocks during the calculation, please increase CalcLockBlock setting and then retry(a small data cache setting could also cause this problem, please check the data cache size setting).

    Hi,
    Our Environment is Essbase 11.1.2.2 and working on Essbase EAS and Shared Services components.One of our user tried to run the Cal Script of one Application and faced this error.
    Dynamic Calc processor cannot lock more than [100] ESM blocks during the calculation, please increase CalcLockBlock setting and then retry(a small data cache setting could also cause this problem, please check the data cache size setting).
    I have done some Google and found that we need to add something in Essbase.cfg file like below.
    1012704 Dynamic Calc processor cannot lock more than number ESM blocks during the calculation, please increase CalcLockBlock setting and then retry (a small data cache setting could also cause this problem, please check the data cache size setting).
    Possible Problems
    Analytic Services could not lock enough blocks to perform the calculation.
    Possible Solutions
    Increase the number of blocks that Analytic Services can allocate for a calculation:
    Set the maximum number of blocks that Analytic Services can allocate to at least 500. 
    If you do not have an $ARBORPATH/bin/essbase.cfg file on the server computer, create one using a text editor.
    In the essbase.cfg file on the server computer, set CALCLOCKBLOCKHIGH to 500.
    Stop and restart Analytic Server.
    Add the SET LOCKBLOCK HIGH command to the beginning of the calculation script.
    Set the data cache large enough to hold all the blocks specified in the CALCLOCKBLOCKHIGH setting. 
    Determine the block size.
    Set the data catche size.
    Actually in our Server Config file(essbase.cfg) we dont have below data  added.
    CalcLockBlockHigh 2000
    CalcLockBlockDefault 200
    CalcLockBlocklow 50
    So my doubt is if we edit the Essbase.cfg file and add the above settings and restart the services will it work?  and if so why should we change the Server config file if the problem is with one application Cal Script. Please guide me how to proceed.
    Regards,
    Naveen

    Your calculation needs to hold more blocks in memory than your current set up allows.
    From the docs (quoting so I don't have to write it, not to be a smarta***:
    CALCLOCKBLOCK specifies the number of blocks that can be fixed at each level of the SET LOCKBLOCK HIGH | DEFAULT | LOW calculation script command.
    When a block is calculated, Essbase fixes (gets addressability to) the block along with the blocks containing its children. Essbase calculates the block and then releases it along with the blocks containing its children. By default, Essbase allows up to 100 blocks to be fixed concurrently when calculating a block. This is sufficient for most database calculations. However, you may want to set a number higher than 100 if you are consolidating very large numbers of children in a formula calculation. This ensures that Essbase can fix all the required blocks when calculating a data block and that performance will not be impaired.
    Example
    If the essbase.cfg file contains the following settings:
    CALCLOCKBLOCKHIGH 500  CALCLOCKBLOCKDEFAULT 200  CALCLOCKBLOCKLOW 50 
    then you can use the following SET LOCKBLOCK setting commands in a calculation script:
    SET LOCKBLOCK HIGH; 
    means that Essbase can fix up to 500 data blocks when calculating one block.
    Support doc is saying to change your config file so those settings can be made available for any calc script to use.
    On a side note, if this was working previously and now isn't then it is worth investigating if this is simply due to standard growth or a recent change that has made an unexpected significant impact.

  • HT4623 I'm trying to update my iPhone 5 to IOS 7 through iTunes. I get a pop up saying I need to update my iTunes to  11.0.5 before I can update my iPhone. The problem is my iTunes is current, and no update for iTunes is found. Any one have any suggestion

    I'm trying to update my iPhone 5 to IOS 7 through iTunes. I get a pop up saying I need to update my iTunes to  11.0.5 before I can update my iPhone. The problem is my iTunes is current, and no update for iTunes is found. Any one have any suggestions?

    I had the same problem. My phone wasn't finding it so I tried plugging it into my laptop and it said I needed the latest iTunes which I already had.... I unplugged my phone from my laptop and did a soft reset to my phone (hold down the lock button and home button at the same time until your phone turns off) once it turns back on you should find the update... Click general... Software update. Worked for me!

  • My iPad2 getting problem while charging through charging adaptor it's getting on off consist sly please hep me in this regard

    My iPad2 getting problem while charging through charging adaptor it's getting on off consist sly please hep me in this regard

    My iPad2 getting problem while charging through charging adaptor it's getting on off consist sly please hep me in this regard

Maybe you are looking for

  • Sleep Indicator Light (SIL) not functioning

    Hello, I own a Macbook Pro 13" (Mid 2012 model). The unit was purchased in March 2013. However, I notice that the indicator of sleep (SIL) no longer works, and that already a long time. Not when starting up the macbook, not when the macbook is brough

  • Forms Listener port number as a service!!!

    How can you specify the port number of the listener when it is installed as a service? I tried port=???? but it ignores it and default back to 9999... null

  • Display change material price for a customer ?

    Hello, Could you please show mw which transaction used for displaying and changing the material price for a customer ( Based on period) Thanks,

  • Link between VBRP and KONV

    hello,     any idea for the link between VBRP and KONV tables ? I am fetching vbeln from vbak and based on that i am getting matnr and quantity details from vbrp now i want to get condition type and tax code details from konv.how to link it? regards

  • Anyone having trouble sharing large images via email with Aperture 3 and OSX 10.7.2?

    I am having trouble sharing images via email with Aperture 3. No matter what size I have in the preferences, the image is thumbnail size. The requested size flashes on the email a couple of times but the small size remains and is sent. I am using OSX