How to count the number of elements in a data block

Hi all
How to count the number of elements in a particular data block oracle Forms 10g.
If it's a text_item or the display_item or the list_item etc is there any method to do this.

Please answer...

get the first element with GET_BLCOK_PROPERTY(..., FIRST_ITEM);
loop until GET_ITEM_PROPERTY(..., NEXTITEM) is null
count on in the loop.

Tags: Oracle Development

Similar Questions

  • How to count the number of nodes under each parent in any given xml

    How to count the number of nodes under each parent in any given xml. for example the xml below was
    books has 3 childern, library [1] has 4, [2] library has 6 and bookshop [3] has 2. is it possible to get the number of tags in a childnode duplicate IE library [1]
    Book1 Tagus repeated twice... vice versa. do we need to make plsql lie we can achieve through sql

    < book >
    < library >
    ABC < book1 > < / book1 >
    BCA < book2 > < / book2 >
    ACR < book1 > < / book1 >
    Lac < Book4 > < / Book4 >
    < / book >
    < library >
    ABC < book1 > < / book1 >
    BCA < book2 > < / book2 >
    ACR < book3 > < / book3 >
    ACR < book3 > < / book3 >
    tray of < bookn_1 > < / bookn_1 >
    adjusted cost base < bookn > < / bookn >
    < / book >
    < library >
    ABC < book1 > < / book1 >
    BCA < book2 > < / book2 >
    < / book >
    < / books >


    I tried this... query.

    Select
    XMLQUERY ('count($doc/Books/Bookstore[1]/descendant::*)' in the way of xmltype ("< books >
    < library >
    ABC < book1 > < / book1 >
    ACR < book1 > < / book1 >
    Lac < Book4 > < / Book4 >
    < / book >
    < library >
    ABC < book1 > < / book1 >
    BCA < book2 > < / book2 >
    < / book >
    (< / books > ')
    as 'doc' of happy return) .getNumberVal () as node_count
    of the double

    Select
    XMLQUERY ('count($doc/Books/descendant::*)' in the way of xmltype ("< books >
    < library >
    ABC < book1 > < / book1 >
    ACR < book1 > < / book1 >
    Lac < Book4 > < / Book4 >
    < / book >
    < library >
    ABC < book1 > < / book1 >
    BCA < book2 > < / book2 >
    < / book >
    (< / books > ')
    as 'doc' of happy return) .getNumberVal () as node_count
    of the double

    How can I get the counts for each parent in a single query

    Published by: user7955917 on August 24, 2012 07:26

    Generic function how you want the query to be.

    If the structure is known in advance, as in your example a 'books' and then a 'library' root element, it's as simple as:

    SQL> select x1.parent_id, x2.child_name, count(*)
      2  from tmp_xml t
      3     , xmltable(
      4         '/books/bookstore'
      5         passing t.object_value
      6         columns parent_id   for ordinality
      7               , child_list  xmltype path '*'
      8       ) x1
      9     , xmltable(
     10         '/*'
     11         passing x1.child_list
     12         columns child_name varchar2(30) path 'name()'
     13       ) x2
     14  group by x1.parent_id, x2.child_name
     15  order by x1.parent_id, x2.child_name
     16  ;
    
     PARENT_ID CHILD_NAME                       COUNT(*)
    ---------- ------------------------------ ----------
             1 book1                                   2
             1 book2                                   1
             1 book4                                   1
             2 bookn                                   1
             2 bookn_1                                 1
             2 book1                                   1
             2 book2                                   1
             2 book3                                   2
             3 book1                                   1
             3 book2                                   1
    
    10 rows selected
     
    

    If you want a generic solution that works without knowledge of the structure, you will need a recursive approach, and most importantly, you should know which nodes in distinct, I suppose that the leafs?

    Also, please help if you can provide the link of reference on the function name() years what are the other expression, that I can use after the path

    You can start reading the documentation: http://docs.oracle.com/cd/E11882_01/appdev.112/e23094/xdb_xquery.htm#CBAGCBGJ

    The clause PATH expects a XQuery expression however before 11.2, we can put only simple XPath expressions.

  • How to count the number of pages on the spread

    How to count the number of pages on the spread

    #include "ILayoutControlData.h".

    #include "ILayoutUIUtils.h".

    #include "ISpread.h".

    InterfacePtr layoutData (Utils()-> QueryFrontLayoutData());

    If (layoutData)

    {

    UIDRef spreadRef is layoutData-> GetSpreadRef();.

    InterfacePtr activeSpread (spreadRef, UseDefaultIID ());

    Int32 count is activeSpread-> GetNumPages();.   Number of pages of active propagation.

    }

  • How to count the number of hit on the page, click

    Hello..
    can someone tell me...
    How to count the number of hit on the page, click

    Thanks in anticipation...

    Somethig like that?
    http://www.baigzeeshan.com/2011/12/Oracle-ADF-storing-temporary-values-in.html

  • How to count the number of columns in an oracle table using sql

    How to count the number of columns in an oracle table using sql

    You must put the name of the table in capital letters

    As

    SELECT COUNT(1)
      FROM user_tab_columns
    WHERE table_name = 'EMP';
    
    or
    
    SELECT COUNT(1)
      FROM user_tab_columns
    WHERE table_name = UPPER('Emp');
    

    Concerning
    Arun

  • How to count the number of data records?

    Hey guys, how to count the number of records, I had on a data object variable?

    Im having a result of sql query in a variable like this:

    oDB.resolveNode("#command").query.select.value = "SELECT * FROM Customers WHERE CliNombre LIKE ' % ' + input1 +" %' ";

    oDB.open ();

    oDB.first ();

    So I need to count the number of records retrieved by this SQL query at the moment. Help please

    Then move the cursor back to the first record after you have your account.

    There is a keyword count in SQL that will allow you to get the account of your request. You can run that first - get your account, and then run the actual query to get the Recordset. This would require a separate data connection. Some examples of code.

    var xfa.event.newText = inName;
    If (inName == "") {}
    App.Alert ("you must enter a name--try again!")
    }
    var nIndex = 0;
    While (xfa.sourceSet.nodes.item (nIndex) .name! = "DataConnection2")
    {
    nIndex ++;
    }

    oDB = xfa.sourceSet.nodes.item (nIndex) .racing var (1); pertaining to the specified data connection node
    App.Alert (ODB.saveXML ("Pretty"));

    var nIndex = 0;
    While (xfa.sourceSet.nodes.item (nIndex) .name! = "DataConnection3")
    {
    nIndex ++;
    }
    var oDBCount = xfa.sourceSet.nodes.item (nIndex) .racing (1); pertaining to the specified data connection node
    Configure sql call DB to get the number of records that match the criteria

    oDBCount.nodes.item (1).query.setAttribute ("text", "commandType");
    oDBCount.nodes.item (1).query.select.nodes.item (0) .value = "Select count (*) from table1 where AcctNumber = '" + inName + "'";
    oDBCount.open)
    oDBCount.close)

    Configure sql call DB to get the specified employee number

    oDB.nodes.item (1).query.setAttribute ("text", "commandType");
    oDB.nodes.item (1).query.select.nodes.item (0) .value = "Select * from table1 where AcctNumber = '" + inName + "'";
    App.Alert (ODB. Nodes.Item (1) .saveXML ("Pretty"));

    now connect to the DB and get a recording
    oDB.open)
    oDB.close ();

    Note the SQL command use the keyword count (take a look at the oDBCount section). This will return a number of return to the cllaer. When I set up the data connection, a node count (*) that appeared there. I dragged to the form and it has created a field called count that the onus at this node. When the query is executed, the number of resulting records returns to this field. You can have hidden it so that your users can not see it and also to change the binding votes to zero, so it is not included in the data file that is submitted when the form is complete.

    Paul

  • How to count the number of conditionally highlight cells in a column or row

    I'm working on a table to identify problems with my credit rating. So, I have a column that indicates the due date on the invoice and G that contains the date to which I made the payment.

    I'm trying to follow how many times I'm late with payments. I want to improve.

    So if the G column is later than column D, both with the Date formatting. So, now I've highlighted cells and I want to summarize for the year, how many times I was late payments.

    I thought a column G to count the number of days before or after that back I was with payments. But if the sum, it only gives me no useful information. I guess I could count the number of cells with values less than 0.

    I prefer to be able to put in the summary column for G something that said 0-12 years ago has highlighted cells in the column.

    Thank you

    You can not count based on sharing or formatting.  You can, however, be based on the same conditions.

    There are functions:

    COUNTIF() counties based on a condition is true

    and

    COUNTIFS() based on several conditions being true

    = NB. If

    Here is a way.  IT will take an additional column that calculates the "delay" in the days of a payment

    the first two lines are the lines of header

    H3 = IF (COUNTA (D3, G3) > 1, MAX ((G3−D3) DUR2DAYS, 0), "")

    It's shorthand dethrone select cell H3, and type (or copy and paste it here) the formula:

    = IF (COUNTA (D3, G3) > 1, MAX ((G3−D3) DUR2DAYS, 0), "")

    Now select cell H3, copy

    Select the H3 cells at the end of column H, dough

    H1 = "payments late =" & COUNTIF(H,">0")

  • How to count the number of AAA clients

    Hello

    As we know, ACS5.2 is necessary with a basic license - 500 devices support network.

    Sometimes, there are a lot of AAA clients or network devices that are authenticate simultaneous. So my question is, how to count network devices allowed to auth on ACS5.2? This only includes network, including network devices, or the AAA clients or devices?

    Rgds,

    Laowu5017

    Hello

    ACS 5.x counts the number of AAA clients that are configured on the ACS.

    Please note that clients and network devices of AAA is the same and they conform, switches, routers, WLCs, or any other device configured under

    Network resources > ... > Network devices and the AAA Clients

    The AAA Clients aren't the AAA suplicants.

    End-user PCs customers are the AAA suplicants, and for this, there is no limit to number.

    HTH,

    Tiago

    --

    If this helps you or answers to your question if it you please mark it as 'responded' or write it down, if other users can easily find it.

  • How to count the number or lines in the file

    Hi Experts,

    I'm file as source and Oracle as target. My folder that contains some data that will load the target.
    My requirement is that I want to count the number of lines that contains my folder. Please help me how to count the total number of lines in the file.


    THX,
    Sara.

    Hi Sahaveda,

    Now, I tried and it works.

    Sorry my mistake again.

    I created HR. ETL_FILE_LOG as below:

    CREATE THE TABLE HR. ETL_FILE_LOG (numero_fichier varchar2 (10))

    Below the code will run without error:

    import java.lang as lang

    import java.sql SQL

    import of java.lang.String

    Import os

    disadvantages is sql. DriverManager.getConnection ("<%=snpRef.getInfo("DEST_JAVA_URL")%>", "<%=snpRef.getInfo("DEST_USER_NAME")%>", "<%=snpRef.getInfo("DEST_PASS")%>")

    dblinks = cons.createStatement)

    File1 = Open ('c:\EMP.txt','r')

    Count = 0

    Line = file1. ReadLine()

    all online! ='' :

    Count += 1

    Line = file1. ReadLine()

    File1. Close()

    sqlQuery = "insert into HR. "The values of ETL_FILE_LOG (numero_fichier) (" + str (count) + ' ") '.

    rqQuery = dblinks.execute (sqlQuery)

    jerks. Close()

    Concerning

  • How to find the number of days between 2 date elements in the XSLT file

    Hello

    I need to calculate the number of days between 2 date elements (type xs: date). Can you please direct me as to how I can do the same thing.

    I work in 11g and using XSLT 1.0. I tried several options but yet to get a solution for this. I think that this can be done also using XSLT 2.0, but who has not worked for me.

    Can someone please help with this problem, thanks in advance!

    Thank you
    Anju

    Hello

    Have you seen this message?
    Re: Get the Date difference between 2 values of date in days

    You can do in the XSLT file since the dates are in ISO 8601 format.
    http://www.w3.org/TR/NOTE-datetime

    Here is a sample XSLT...

    
    
    
    
    
    
    
    

    The XSLT above will result in * 4 * for the next entry...

    
    2012-01-11T00:00:00.000-05:00
    2012-01-15T00:00:00.000-05:00
    
    

    You can test this example here...
    http://xslttest.appspot.com/

    I hope this helps...

    See you soon,.
    Vlad

    It is considered good etiquette to the answerers rewards with points (as "useful" - 5 pts - or 'correct' - 10pts)
    https://forums.Oracle.com/forums/Ann.jspa?annID=893

  • How to count the number of edges using counters SMU-6363

    Hello

    I'm counting the number of edges in a test signal in a duration of 50 Ms I use the SMU-6363 map and connect to the TRC test signals 0 SRC (PFI 8). Is that a correct connection? What else do I need hardware wise be a correct set for this application?

    Thank you

    Jeet

    Hi Jeet,

    This configuration is correct. Hardware wise, that's all you need to do.

    Kind regards

    Jorge Fernandez
    Technical sales engineer
    National Instruments
    ____________________________________________
    Certified LabVIEW Associate Developer (CLAD)

  • How to count the number of updates in a loop Forall

    Hi friends

    I want to know is - it possible to count the number of updates occurred in FORALL. I share the codes below. His only return the iteration number. If I spend 5 through the values of the PARAMETERS and 2 updates the values in the table then return 5 instead of 2.  My requirement is to count the number of updates have taken place and return this value to OUTPUT parameter. If possible, please share codes. Thank you very much...

    CREATE OR REPLACE PROCEDURE UPDATE_PROCESS_RATE 
              (
               V_HOSPITAL_ID IN HOSPITAL_SERVICE_MASTER.HOSPITAL_ID%TYPE,
               V_USER IN VARCHAR2,
               V_DATE IN DATE,
               V_PROCESS_ID  IN VARR_ARRAY,
               V_PROCESS_RATE IN NUM_ARRAY,
               V_NUM OUT NUMBER
               )
    
    
                IS
    
                    V_ERROR_CODE NUMBER(15);
                    V_ERROR_MSG VARCHAR2(200);
                    V_ARRAY_ID NUMBER(10,2);
                    V_TOTAL NUMBER:=0;                                            
       BEGIN
                  SAVEPOINT Sp1;
             BEGIN
       
                   FORALL i IN V_PROCESS_RATE.FIRST..V_PROCESS_RATE.LAST
                 
                               UPDATE HOSPITAL_SUBSERVICE_PROCESS M 
                               SET M.PROCESS_CHARGE=V_PROCESS_RATE(i)
                               WHERE M.HOSPITAL_ID=V_HOSPITAL_ID
                               AND M.HOSPITAL_PROCESS_ID =V_PROCESS_ID(i);
                                                        
                   FOR i IN V_PROCESS_RATE.FIRST..V_PROCESS_RATE.LAST LOOP
                
                       V_TOTAL:=V_TOTAL + SQL%BULK_ROWCOUNT(i);
                   End loop;
               
                       COMMIT;  
                       V_NUM:=V_TOTAL;           
    
    
    
    
    

    IndiMinds wrote:

    But my requirement is: it must count the update only when it detects a different value from array. When it detects a different value in the table must be updated and count it and if the update of the table value is similar the TI should not count it.

    For example, if the V_PROCESS_RATE table have these 3 values (10,20,30) and we need to update these 3 values with (10,40,50), so no update, it should return is 2 not 3.

    Thank you

    And then don't update these lines, change your update statement

    UPDATE HOSPITAL_SUBSERVICE_PROCESS M
    SET M.PROCESS_CHARGE=V_PROCESS_RATE(i)
    WHERE M.HOSPITAL_ID=V_HOSPITAL_ID
    AND M.HOSPITAL_PROCESS_ID =V_PROCESS_ID(i)
    AND DECODE(M.PROCESS_CHARGE,V_PROCESS_RATE(i),0,1) = 1;
    
  • How to count the number of updates in a loop?

    Hello world

    Warm greetings

    I'm using Oracle 11 g. I want to count the number of updates inside a loop. If updating not only one value in the table, then it should return 0 otherwise, it should count the number of updates and return it. I used SQL % ROWCOUNT, but returning an incorrect value.

    I share the sample codes.

    procedure proc1 (vid IN Number, vprocessId IN varr_varray, vCharge IN vnum_varray,vcnt OUT)
    IS
    vFlag Number(3):=0;
    Begin
    
    
    vflag:=vprocessId.FIRST;
    If vflag is not null then
    For vprocessId.FIRST..vprocessId.LAST
    Loop
    Update table set colCharge=vCharge(i)
    where colId=vid
    and  colProcessId= vprocessId(i);
    
    
    
    
    End Loop
    End;
    

    Please close the question if it has been answered.

  • How to count the number of clicks: a user makes? + Penalized if too many

    Hi all

    I have a video where the user needs to search for objects. It should click when an object is in the video. I created click boxes during the opportune times.

    What I do:

    I count the number of clicks and display it below the video. So, for example when a user clicks on an icon at the bottom of the video. If he clicks 5 times more, there are 6 icons in a row. Too much pressure, I can say that the user is cheating and give him a score of 0.

    Anyway to do this?

    The first decision is to increment the counter by 1, sorry, typed too fast should be:

    Increment of 1 V_counter

    You should see that the syntax when you created the first decision. This means that each click will add 1 to v_counter, the reason why it must be the first decision. Only indicator related to the value of v_counter must be added, given that the previous indicators are already should have been disclosed with the previous clicks. This conditional action must be triggered by the success of the click box. Because it takes several clicks, is expected to try it myself, was little crowded today. Apology.

    You add new information now: what do you mean by "conditional login?

    If you need to partition must be reported to an LMS (still do not know which), you should know that all quiz system variables are read-only. This means that the maximum score is set at the beginning of the tutorial. You can attach a note to each interactive object. Probably the best way would be to add a button next (with a break point after the click box), who will get a score. Since you want a penalty when v_counter is greater than 5, you will need to use the following two buttons: one with a score = 0 and the other with a score = X (points you want to give). If you put the beginning of the chronology of these buttons just after the timeline of the click box, you can add a final decision to the advanced conditional action that will check which button to display. If I label the value 0 has marked button "Bt_Next_0" and the version marked "Bt_Next_points" that last decision is:

    IF v_counter is greater than 5

    Disable Bt_Next_points

    Hide Bt_Next_points

    See the Bt_Next_0
    Select Bt_Next_0

    ON THE OTHER

    Disable Next_0

    Hide Bt_Next_0

    See the Bt_Next_points
    Select Bt_Next_points

  • How to count the number of words in a string?

    It is only possible by counting the number of white spaces in the string?

    You can use the String.Split method to divide the string into an array using the character space as delimiter, and then check the length property of the resulting table.

Maybe you are looking for

  • In Firefox 18.0.2.when, I hit the Home button, it opens a new tab. Why?

    This does not always occur but only recently started. I tried to reset my homepage nothing helps.

  • Palivion HP dv2000 can not connect main account

    Dear Sir / Madam,. I created two accounts. One is the main account and the other is Standard user for my grandson. But now when I click on the icon of the main account, the screen as below. The user profile Service service has no logon. User profile

  • Question of CLAD

    A.Blue represents the Standard of the Subvi and Red Express VI. B.Blue represents the Standard the Subvi and yellow Express VI. C.Yellow represents the Standard of the Subvi and blue Express VI. D. red represents the Standard of the Subvi and blue Ex

  • write to the file at the end of the program

    I am trying to acquire data of resistance on a DAQmx channel. The data are acquired in a while loop. I need the program to keep storing data in a table that develops according to the incoming data and writes all data in a file when the program ends.

  • DV7-1130us CPU Upgrade

    I have a Pavilion laptop dv7-1130us.  It comes from the factory with an AMD Turion 2.0 Ghz processor installed.  Can I upgrade the CPU to an AMD Turion Ultra 2.4 Ghz CPU?  It is faster, it has a larger onboard cache, and it supports hyperthreading I