Query to get total counts in the given scenario

Hi,
I am using Oracle 10g
I have a table A with following data
AgId     Trm     CD     S
1000     100010     12-JAN     A
1000     100019     20-MAR     A
1000     100019     20-JUL     D
1001     100011     25-JAN     A
1001     100011     20-FEB     D
1001     100011     23-MAR     A
1001     100012     31-JAN     A
1002     100013     14-FEB     A
1002     100013     05-APR     D
1002     100015     02-MAY     A
1003     100014     03-MAR     A
1003     100014     25-MAR     D
1004     100016     22-MAY     A
1004     100017     21-JUN     A
1004     100018     01-JUL     A
1005     100020     21-MAY     D
1005     100020     21-JUL     A
1005     100020     11-AUG     D
Here the overall status of AgId '1000' is A as he is having atleast 1 Trm active
Similarly, status of AgId '1001' is A
status of AgId '1002' is A
But,status of AgId '1003' is D as his trm is disconnected after activation(according to date column'CD')
Then, status of AgId '1004' is A
and finally status of AgId '1005' is D again as his trm deactivated, activated and deactivated at last
So, considering these criteria can any one give me a query to get total no of AgId's who are 'Active' and similarly for 'Deactive'

Hi,
when you put some code please enclose it between two lines starting with {noformat}{noformat}
i.e.:
{noformat}{noformat}
CREATE TABLE ... etc.
{noformat}{noformat}
Also do not forget to put correct statements. Your insert were missing semicolon at the end.
Coming back to your problem, I assum that the current status of any trm is the latest status so I have done what follows:
{code:sql}
SELECT agid
     , trm
     , cd
     , s
     , ROW_NUMBER () OVER (PARTITION BY agid, trm ORDER BY cd) rn
     , COUNT (*) OVER (PARTITION BY agid, trm) rn_tot
FROM a
ORDER BY agid, trm, cd;
Output:
      AGID        TRM CD        S         RN     RN_TOT
      1000     100010 12-JAN-12 A          1          1
      1000     100019 20-MAR-12 A          1          2
      1000     100019 20-JUL-12 D          2          2
      1001     100011 25-JAN-12 A          1          3
      1001     100011 20-FEB-12 D          2          3
      1001     100011 23-MAR-12 A          3          3
      1001     100012 31-JAN-12 A          1          1
      1002     100013 14-FEB-12 A          1          2
      1002     100013 05-APR-12 D          2          2
      1002     100015 02-MAY-12 A          1          1
      1003     100014 03-MAR-12 A          1          2
      1003     100014 25-MAR-12 D          2          2
      1004     100016 22-MAY-12 A          1          1
      1004     100017 21-JUN-12 A          1          1
      1004     100018 01-JUL-12 A          1          1
      1005     100020 21-MAY-12 D          1          3
      1005     100020 21-JUL-12 A          2          3
      1005     100020 11-AUG-12 D          3          3I have used to columns rn and rn_tot to find the latest entry for a specific agid, trm
Using the query above I have done the following:
WITH mydata AS
   SELECT agid
        , trm
        , cd
        , s
        , ROW_NUMBER () OVER (PARTITION BY agid, trm ORDER BY cd) rn
        , COUNT (*) OVER (PARTITION BY agid, trm) rn_tot
    FROM a
SELECT agid
     , CASE WHEN SUM (CASE s WHEN 'A' THEN 1 END) > 0 THEN 'A' ELSE 'D' END s
  FROM mydata
WHERE rn = rn_tot
GROUP BY agid;
Output:
      AGID S
      1000 A
      1001 A
      1002 A
      1003 D
      1004 A
      1005 D
{code}
Which is listing the agid and its status if at least there is one trm with final status 'A' for that agid.
To sum up everything you can do simply like this:
{code:sql}
WITH mydata AS
   SELECT agid
        , trm
        , cd
        , s
        , ROW_NUMBER () OVER (PARTITION BY agid, trm ORDER BY cd) rn
        , COUNT (*) OVER (PARTITION BY agid, trm) rn_tot
    FROM a
totdata AS
   SELECT agid
        , CASE WHEN SUM (CASE s WHEN 'A' THEN 1 END) > 0 THEN 'A' ELSE 'D' END s
     FROM mydata
    WHERE rn = rn_tot
    GROUP BY agid
SELECT S, COUNT(*) cnt
  FROM totdata
GROUP BY S;
Output:
S        CNT
D          2
A          4
{code}
Regards.
Al                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Similar Messages

  • I want to display total count on the top of a Column in  business graphics

    Hi All ,
        How can I display total count of the column say for example no. of employees in a series of column chart type in business graphics.
    Any type of help would be much appreciated.
    Thanks
    Uday

    Hi Vishweshwara,
    following is the code i wrote. please check the correctness of the code.
    int seriescount = 0;
    for(int i=0;i<nodesize;i++){
    IGraphDataElement catele = gdNode.createGraphDataElement();
    switch(i){
    case 0:   
       if(wdContext.currentContextElement().getQ().equals("Q1")){
         catele.setCategory("Q1");
           catele.setKRA_Series1(Q1_KRA);
           catele.setApp_Pln_Series2(Q1_AP);
           catele.setRev_App_Series3(Q1_RA);
           catele.setEnd_Rev_Series4(Q1_ERP);
           catele.setApp_Procss_Series5(Q1_AIP);
           catele.setApp_overall_Series6(Q1_AOP);
           seriescount = seriescount+1; break;}
            break;
    case 1:       
       if(wdContext.currentContextElement().getQ().equals("Q2")){
           catele.setCategory("Q2");
           catele.setKRA_Series1(Q2_KRA);
           catele.setApp_Pln_Series2(Q2_AP);
           catele.setRev_App_Series3(Q2_RA);
           catele.setEnd_Rev_Series4(Q2_ERP);
         catele.setApp_Procss_Series5(Q2_AIP);
         catele.setApp_overall_Series6(Q2_AOP);
            seriescount = seriescount+1; break; }
                 break;
    case 2:       
    if(wdContext.currentContextElement().getQ().equals("Q3")){
         catele.setCategory("Q3");
         catele.setKRA_Series1(Q3_KRA);
         catele.setApp_Pln_Series2(Q3_AP);
         catele.setRev_App_Series3(Q3_RA);
         catele.setEnd_Rev_Series4(Q3_ERP);
         catele.setApp_Procss_Series5(Q3_AIP);
         catele.setApp_overall_Series6(Q3_AOP);
         seriescount = seriescount+1; break;}
                 break;
    case 3:   
    if(wdContext.currentContextElement().getQ().equals("Q4")){
         catele.setCategory("Q4");
            catele.setKRA_Series1(Q4_KRA);
         catele.setApp_Pln_Series2(Q4_AP);
         catele.setRev_App_Series3(Q4_RA);
         catele.setEnd_Rev_Series4(Q4_ERP);
         catele.setApp_Procss_Series5(Q4_AIP);
         catele.setApp_overall_Series6(Q4_AOP);
            seriescount = seriescount+1; break;}
                 break;
    case 4: if(wdContext.currentContextElement().getQ().equals("All")){
           wdContext.nodeGraphData().invalidate();
         wdContext.currentContextElement().setGraphVisibility(WDVisibility.NONE);
         wdThis.onActiondropdownaction(wdEvent);
    }default:
    wdContext.nodeGraphData().addElement(catele);
    Thanks
    Uday

  • How do I get totally rid of the update to iOS 7.1.2 on 23MB for my iPhone 5?

    How do I get totally rid of the update to iOS 7.1.2 on 23MB for my iPhone 5?
    Do I need improvement of iBeacon connectivity and stability?
    Do I need a bug fix for data transfers for some 3rd party accessories, including bar code scanners?
    Do I need to correct and issue with data protection class of Mail attachments?

    You can't "get rid" of update notifications without doing the update. But then again if you wait for a while there will be iOS 8 available.

  • Need to get total count of a column in the given query

    Hi,
    I have the following query for which i need a total count of distinct concatenated_address. I am trying to use count(distinct adv.concatenated_address) in the below query but because of the group by it does not give me the expected result.
    I am not reusing the same query, in my program again, to get the count as it would affect the performance. This query takes really long to execute and so is there a way to incorporate the count in this single query itself without having to use it twice.
    SELECT DISTINCT (acv.customer_name||','||
    acv.customer_number||','||
    REPLACE(adv.concatenated_address, ',', ' ')||','||
    adv.postal_code||','||
    rct.interface_header_attribute1||','||
    rct.interface_header_attribute6||','||
    rct.creation_date||','||
    rct.trx_date||','||
    aps.due_date ||','||
    SUM(aps.amount_due_original)||','||
    SUM(aps.amount_due_remaining) ||','||
    rct.printing_count ||','||
    TO_DATE(rct.printing_last_printed)||','||
    TO_DATE(rct.printing_original_date)||',') str
    ,acv.customer_id
    ,REPLACE(adv.concatenated_address, ',', ' ') address
    FROM ar_customers_v acv
    ,ar_addresses_v adv
    ,hz_cust_site_uses hcsu
    ,ra_customer_trx rct
    ,ar_payment_schedules aps
    WHERE adv.customer_id = acv.customer_id
    AND hcsu.cust_acct_site_id = adv.address_id
    AND hcsu.site_use_code = 'BILL_TO'
    AND rct.bill_to_customer_id = acv.customer_id
    AND rct.bill_to_site_use_id = hcsu.site_use_id
    AND aps.customer_trx_id = rct.customer_trx_id
    GROUP BY acv.customer_name
    ,acv.customer_number
    ,adv.concatenated_address
    ,adv.postal_code
    ,rct.interface_header_attribute1
    ,rct.interface_header_attribute6
    ,rct.creation_date
    ,rct.trx_date
    ,aps.due_date
    ,rct.printing_count
    ,TO_DATE(rct.printing_last_printed)
    ,TO_DATE(rct.printing_original_date)
         ,acv.customer_id
    ORDER BY acv.customer_id
    ,REPLACE(adv.concatenated_address, ',', ' ')
    Thank you

    try this please
    SELECT COUNT(str),customer_id
    FROM
    (SELECT DISTINCT (acv.customer_name||','||
    acv.customer_number||','||
    REPLACE(adv.concatenated_address, ',', ' ')||','||
    adv.postal_code||','||
    rct.interface_header_attribute1||','||
    rct.interface_header_attribute6||','||
    rct.creation_date||','||
    RCT.TRX_DATE||','||
    aps.due_date ||','|| 
    SUM(aps.amount_due_original)||','||
    SUM(aps.amount_due_remaining) ||','||
    rct.printing_count ||','||
    TO_DATE(rct.printing_last_printed)||','||
    TO_DATE(rct.printing_original_date)||',') str
    ,acv.customer_id
    ,REPLACE(adv.concatenated_address, ',', ' ') address
    FROM ar_customers_v acv
    ,ar_addresses_v adv
    ,hz_cust_site_uses hcsu
    ,ra_customer_trx rct
    ,ar_payment_schedules aps
    WHERE adv.customer_id = acv.customer_id
    AND hcsu.cust_acct_site_id = adv.address_id
    AND hcsu.site_use_code = 'BILL_TO'
    AND rct.bill_to_customer_id = acv.customer_id
    AND rct.bill_to_site_use_id = hcsu.site_use_id
    AND aps.customer_trx_id = rct.customer_trx_id
    GROUP BY acv.customer_name
    ,acv.customer_number
    ,adv.concatenated_address
    ,adv.postal_code
    ,rct.interface_header_attribute1
    ,rct.interface_header_attribute6
    ,rct.creation_date
    ,rct.trx_date
    ,aps.due_date
    ,rct.printing_count
    ,TO_DATE(rct.printing_last_printed)
    ,TO_DATE(RCT.PRINTING_ORIGINAL_DATE)
    ,ACV.CUSTOMER_ID)

  • How to get the total count of the no. or rows a cursor has fetched

    Hi All,
    Is there a way to get the number of rows a cursor query has fetched, without looping into the cursor and using a counter variable
    I mean like in pl/sql table we can directly use the pl/sql table attribute .count is there a way to achieve this in cursor
    thanks a lot in advance

    Qwerty wrote:
    Is there a way to get the number of rows a cursor query has fetched, without looping into the cursor and using a counter variableYes.
    It is zero.
    On the first loop and first fetch it will be 1, second 2 etc.
    This is because cursors have no rows, or fetch no rows until your code or the client uses the cursor to fetch them.
    I mean like in pl/sql table we can directly use the pl/sql table attributeA PL/SQL array is not like a cursor, a PL/SQL array has the rows already fetched into it.
    A cursor is not an array but a pointer to a compiled SQL statement so you cannot count how many rows it has, because it has none. You can only count how many rows you fetch from it.

  • How can I get a count of the number of emails in my inbox folder (not just unread, but total) to display on the folder list?

    I use to have a count of the total number of emails in my inbox. This was listed next to "inbox" in my folder list. With the latest version, this is gone and I can't find anything in the settings that can bring back that feature. I can see the number of emails by right-clicking the folder, but I'd love to be able to just see it at a glance again.

    Do you have this add-on?
    https://addons.mozilla.org/en-US/thunderbird/addon/extra-folder-columns/
    http://chrisramsden.vfast.co.uk/3_How_to_install_Add-ons_in_Thunderbird.html

  • Sql query to get distinct count

    Hi
    I use SQL Server Management Studio
    can I have a sql query to get count as shown below against  each month column and name column to get distinct count.
    for example if there is two rows with the same date period and same name then the count should be one in first row and zero in the next row of the same data.
    Table Name: Table1
    Column: Month, Name
    Month
    Name
    Count
    12/1/2012 0:00
    AK
    1
    12/1/2012 0:00
    AK
    0
    12/1/2012 0:00
    AB
    1
    1/1/2013 0:00
    AK
    1
    1/1/2013 0:00
    AK
    0
    1/1/2013 0:00
    AB
    1
    3/1/2013 0:00
    AA
    1
    3/1/2013 0:00
    AK
    1
    3/1/2013 0:00
    AK
    0
    6/1/2013 0:00
    AA
    1
    6/1/2013 0:00
    AK
    1
    6/1/2013 0:00
    AK
    0
    9/1/2013 0:00
    AA
    1
    9/1/2013 0:00
    AK
    1
    9/13/2013 0:00
    AK
    1
    10/1/2013 0:00
    AA
    1
    10/1/2013 0:00
    AK
    1
    10/1/2013 0:00
    AK
    0

    Hi,
    Thanks for the query but this query gives the total count like shown below
    if see the second row in the below table AK for 2012-12-1 gives total count as 2 but need the query to show the first row as 1 and there after 0
    query result
    Month name cnt
    2012-12-01 00:00:00.000 AB 1
    2012-12-01 00:00:00.000 AK 2
    2012-12-01 00:00:00.000 AK 2
    2013-01-01 00:00:00.000 AB 1
    2013-01-01 00:00:00.000 AK 2
    2013-01-01 00:00:00.000 AK 2
    2013-03-01 00:00:00.000 AA 1
    2013-03-01 00:00:00.000 AK 2
    2013-03-01 00:00:00.000 AK 2
    2013-06-01 00:00:00.000 AA 1
    2013-06-01 00:00:00.000 AK 2
    2013-06-01 00:00:00.000 AK 2
    2013-09-01 00:00:00.000 AA 1
    2013-09-01 00:00:00.000 AK 1
    2013-09-13 00:00:00.000 AK 1
    2013-10-01 00:00:00.000 AA 1
    2013-10-01 00:00:00.000 AK 2
    2013-10-01 00:00:00.000 AK 2

  • Getting total count instead particular count

    Hi all,
    Need out put in the report , i made relation (link) b/w customer_id's
    customer_id:1234
    customer name:Vision Tech
    order no order_name Cost
    1000        ABC        1000
    1001      CCC          2000
    Total Order: 2      Total Cost: 3000
    customer_id:1000
    customer name:Tech
    order no order_name  Cost
    400         DDD           300
    4001       EEE           400
    Total Order: 2     Total Cost: 700
    But getting Total Order: 4     Total Cost: 3700 for both

    Hi,
    I need the as below out put
    Suppose
    deptno 10
    dname ABC
    empno ename sal deptno
    100     aaa     100  10
    101     bbb      100 10
    Total Eployees: 2   Total Sal: 200
    deptno 20
    dname ABC
    empno ename sal deptno
    110     ccc  100  20
    121     ddd  100 20
    161     eee  100 20
    Total Eployees: 3   Total Sal: 300
    But i am getting as below
    deptno 10
    dname ABC
    empno ename sal deptno
    100     aaa     100  10
    101     bbb      100 10
    Total Eployees: 4   Total Sal: 500
    deptno 20
    dname ABC
    empno ename sal deptno
    110     ccc  100  20
    121     ddd  100 20
    161     eee  100 20
    Total Eployees: 4   Total Sal: 500
    I am creating Summry columns for "Total Employees" and "Total Sal"
    Total Employees
    Function:Count
    Source: Empno
    Reset At:Report
    Total Sal
    Function:SUM
    Source:SAL
    Reset At:Report

  • Getting Compilation error in the given code,

    Hello:
    If i use setResizable(false), then maximization option will be disabled,but i want to do close and minimization option will be disabled, then what methods shall i use? Although you have given setClosable(false) and setIconifiable(false), but both methods are not working properly, plz set the methods in the given code or plz give the proper code what i need to use.
    I shall be highly grateful to you, if you kindly help me.
    import java.awt.*;
    import javax.swing.*;
    public class Test{
              public static void main(String args[]){
                   SampleFrame frame = new SampleFrame();
                        frame.setDefaultCloseOperation(3);
                        frame.setVisible(true);
    class SampleFrame extends JFrame{
              public SampleFrame(){
                   setSize(width,height);
                   setResizable(false);
                   setClosable(false); // getting error
                   setIconifiable(false); // getting error
    public static final int width = 300;
    public static final int height = 200;
    }

    I'd post the simple answer, but the reply button never seems to work on your posts.

  • Query to get connect descriptor of the DB instance currently in.

    Guys,
    I need a query to get the Connect descriptor of the Database instance currently logged in?
    Could someone provide guidance?
    Thanks,
    Bhagat

    Thanks for your quick response!!!
    Yes..I need the TNS connect descriptor.
    When i try your command, this is what I get..
    SQL>sqlprompt "_USER'@'_CONNECT_IDENTIFER> "
    _USER'@'_CONNECT_IDENTIFER>
    ..doesn't seem to work..
    Regards,
    Bhagat

  • How to write a query for the given scenario ?

    Hi All ,
    I am having two tables EMP, DEPT with the below data.
    EMP TABLE :--
    EID     ENAME     JOB     SAL     DEPID
    111     RAM     MANAGER     1500     10
    222     SAM     ASST MANAGER     2000     20
    333     KALA     CLERK     2500     10
    444     BIMA     MANAGER     3000     20
    555     CHALA     MANAGER     3500     30
    666     RANI     ASST MANAGER     4000     10
    777     KAMAL     MANAGER     2400     10
    DEPT TABLE :--
    DEPID     DNAME
    10     XX
    20     YY
    30     ZZ
    Q1 : I want the sum of salary of each department and for the particular job . Here in each departmant manager, asst. manager, clerk posts are there .
    I want to display the result like below ....
    JOB     10     20     30
    MANAGER     3900     3000     3500
    ASST MANAGER 4000     2000     NULL
    CLERK     2500     NULL     NULL
    please tell me how to write a sql query ?
    Thanks
    Sai

    In general case, you cannot write this query.
    This is one of the limits of relational database concepts. The number of columns must be known up-front. In the SELECT clause, you have to list and name all columns returned by the query. So you have to know number of departments. (There are some workarounds - you can return one column with concatenated values for all departments, separated by space character).
    If you know that you have 3 departments then you qurey will return 4 columns:
    SELECT
       e.job,
       SUM ( CASE WHEN d.deptid = 10 THEN e.sal ELSE NULL END) d10,
       SUM ( CASE WHEN d.deptid = 20 THEN e.sal ELSE NULL END) d20,
       SUM ( CASE WHEN d.deptid = 30 THEN e.sal ELSE NULL END) d30
    FROM dept d, emp e
    WHERE d.deptno = e.deptno
    GROUP BY e.job

  • Sql query to get Thursday (Date) for the year 2014

    Hello All,
    I want to get the date for all the Thursdays in the year 2014. How can I achieve this using SQL query? Can anybody give me a hand with this? Thanks.
    Amol

    Hi,
    Check if this can help you
    DECLARE @counter INT
    DECLARE @Date Date
    SELECT @counter = 0
    Select @Date = '20131226'
    WHILE @counter <= 52
    BEGIN
    select Thursday = convert(varchar(10),DATEADD(WEEK,1, @Date),120)
    SELECT @counter = @counter + 1
    Select @Date = DATEADD(WEEK,1, @Date)
    END
    Regards
    Prasad Tandel
    Please dont forget to mark as answer if this helps you :)

  • Single Query for getting total no of records N getting records from a selected range

    Hi,
    Got the below query:
    SELECT a.*, rowid FROM (SELECT name, postcode FROM Tbl ORDER BY name asc)a WHERE ROWNUM <=30
    MINUS
    SELECT b.*, rowid FROM (SELECT name, postcode FROM Tbl ORDER BY name asc) b WHERE ROWNUM <= 10
    Though I got the results right, I also want to know the total no of records from "SELECT name, postcode FROM Tbl ORDER BY name asc". Does anyone knows how to do it in a single query?
    Thanks.

    hi Carol
    The following output may help you.
    SQL> l
    1 select * from emp where (rowid,0) in (select rowid,mod(rownum,10)-rownum from emp)
    2 minus
    3* select * from emp where (rowid,0) in (select rowid,mod(rownum,6)-rownum from emp)
    SQL> /
    EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
    7839 KING PRESIDENT 17-NOV-81 5000 10
    7844 TURNER SALESMAN 7698 08-SEP-81 1500 0 30
    7876 ADAMS CLERK 7788 12-JAN-83 1100 20
    7900 JAMES CLERK 7698 03-DEC-81 950 30
    The above query fetches the 6,7,8,9th records only.
    Well my suggestion would be not to use ROWNUM directly in where clause since it changes dynamically. it is not a fixed value. for example pls see the result.
    SQL> select rownum,empno,ename,sal,job from emp where sal > 3000;
    ROWNUM EMPNO ENAME SAL JOB
    1 7839 KING 5000 PRESIDENT
    SQL> select rownum,empno,ename,sal,job from emp where sal > 1000;
    ROWNUM EMPNO ENAME SAL JOB
    1 7566 JONES 2975 MANAGER
    2 7654 MARTIN 1250 SALESMAN
    3 7698 BLAKE 2850 MANAGER
    4 7782 CLARK 2450 MANAGER
    5 7788 SCOTT 3000 ANALYST
    6 7839 KING 5000 PRESIDENT
    7 7844 TURNER 1500 SALESMAN
    8 7876 ADAMS 1100 CLERK
    9 7902 FORD 3000 ANALYST
    10 7934 MILLER 1300 CLERK
    10 rows selected.
    SQL> select * from emp where rownum = 1;
    EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
    7566 JONES MANAGER 7839 02-APR-81 2975 20
    The record of employee KING is getting the rownum differently.
    My understanding (out of my little knowledge) is the rownum values are assigned to the records only after the records are read physically and after applying the conditions(without rownum). Then the row numbers (rownum) is assigned to the records. Hence the rownum is not constant to a record since it is a dynamic value.
    Well i would like to know the suggestions of the ORACLE EXPERTS here in the discussion forum.
    If my finding is correct then OK if not Pls excuse me and pls give the correct solution
    Regards
    Prakash Eranki
    [email protected]

  • How to get to know that the given OBJECT is a drop-down or check box?

    I put a drop-down object in my_form, the details are,
    drop-down name = my_drop_down
    data binded with my_data
    caption = my_caption
    For some, reason, some one has given me this objects (my_drop_down)... i want to figure it out that Whether its a drop-down type of object or a check box or a text field? How can i figure it out PROGRAMITICALLY/Java script?

    Thank you, But, i need to figure out it PROGRAMMITICALLY with java script?
    i used,
    xfa.resolveNode("CUSTOMER.P1.Subform1.TextField28").id == 'DropDown'
    it did not worked! pls. help me
    Regards

  • How can I get a count at the same time I am inserting into another table

    I have a requirement where I have to find out the count(number of records inserted into another table) at the same time I insert into the table:
    Like
    I am copying records from table B to A, while doing this I have to find out how many records I've inserted since I need this count in subsequent steps
    INSERT INTO A
    SELECT * FROM B
    how can I store the count into any variable while doing above statement
    Please advice

    No, Warren that doesn't work!
    SQL> set serveroutput on
    SQL> declare
      2     vCtr  number := 0;
      3  begin
      4     insert into emp2
      5     select * from emp;
      6
      7     select count(*)
      8       into vCtr
      9       from emp2;
    10
    11     dbms_output.put_line('rows created '||to_char(vCtr));
    12  end;
    13  /
    rows created 15
    PL/SQL procedure successfully completed.
    SQL> declare
      2     vCtr  number := 0;
      3  begin
      4     insert into emp2
      5     select * from emp;
      6
      7     select count(*)
      8       into vCtr
      9       from emp2;
    10
    11     dbms_output.put_line('rows created '||to_char(vCtr));
    12  end;
    13  /
    rows created 30
    PL/SQL procedure successfully completed.
    SQL>

Maybe you are looking for

  • I have pages. Do I have to pay $20 to open the pages I "updated while king a doc?

    I have pages. Was ask if I wanted to update a doc. Said ok. Now doc can't be opened with pages. Do I have to pay $0 to work on my doc?

  • Set sales employee as inactive

    Hello, in SAP BO you can add sales employee, but can not be erased. Number of buyers is growing - when you create a document (invoice, ...) list of sales employees becomes confusing. We would welcome the possibility of setting sales employee as INACT

  • Mac mail still opens at startup

    I have been having issues with Mail opening every time on a restart/shutdown/log off.  It is not selected to open at start up and it is none of the StartupItems folders in either System, Users or Mac HD. Just recently changed the Default mail reader

  • BPM Workspace - New Page

    How Can i create a Page into BPM workspace which is generically application to all process users instead of a single user, from whom i created the page.

  • What are the different ways to improve performance of WSRP?

    Producer - Websphere Portal 6 Consumer - Weblogic Portal 10.2 Also, if anyone can way to optimize the performance of remote portlets in general would be helpful to everyone. Thank You