How the group based on a filter data

Hello

I have to build report master detail some conditions with tabular data, as provided in attachment ["Data.xml"]

Requirement is,

1 [level 1] group of Show Master Data by identifiant_volume

2 [level 2] two banking details against ENTRY_TYPE = BS and receiving cash ENTRY_TYPE > CR under master group (both with different layout).

3. [level 3] see the void individual details of Bank and cash received in reference to respective detail above (both with different layout)

See presentation of the attachment [report.png]

Note: it is possible either banking or cash receipt available or available

Problem:

I can't apply the filter to the level of the Group

VT

<? for-each-group: ROWSET1 / ROWSET1_ROW; / Identifiant_volume? >

Some data fields...

Bank

<? for-each-group: current-group () / [ENTRY_TYPE ='BS']; / VOL_BK_ID? >

Some data fields...

<? for - each:current-group()? >

Some data fields...

<? end foreach? >

<? end for each group -? >

Receipt

<? for-each-group: current-group () / [ENTRY_TYPE ='CR']; / VOL_BK_ID? >

Some data fields...

<? for - each:current-group()? >

Some data fields...

<? end foreach? >

<? end for each group -? >

<? end for each group -? >

In fact, your syntax was wrong, I made some correction (in bold) it works fine, but in this code, you must manage the Bank and receipt of the case if anyone detailed the position isn't here.

I hope that it would help your understanding,

VT

Some data fields...

Bank

<>[. / ENTRY_TYPE = "BS"]; / VOL_BK_ID? >

Some data fields...

Some data fields...

Receipt

<>[. / ENTRY_TYPE = "CS"]; / VOL_BK_ID? >


Some data fields...

Some data fields...

Tags: Business Intelligence

Similar Questions

  • How the Group of columns in the tabular section?

    I have a table have many columns, how to hardcode in a few columns combined text group name1 and remains of columns in Group 2?

    Summit theme universal - 42

    development environment: apex.oracle.com

    TB form group column.PNG

    Ramani_apex wrote:

    I have a table have many columns, how to hardcode in a few columns combined text group name1 and remains of columns in Group 2?

    Summit theme universal - 42

    development environment: apex.oracle.com

    Why "Group 1" appear twice? If there are only two groups involved then all columns of 'Group 1' must be contiguous, followed by all the columns "group 2"(otherwise there are actually three groups...)

    1. create a copy of the Standard report template. Notice that the model contains a hard-coded column layout names of columns of that group it can be used only for tabular forms and reports containing this specific set columns in this provision and it must therefore be appointed accordingly.

    2. change the new report template, the definition column header before changing to:

    
      Group 1Group 2Group 3
    

    3. edit the report used in the region in a table in the new model model.

  • How the group using SQL for the desired output.

    Hi all

    I am currently using oracle 10.2.0.4.0

    Create a table script:
    CREATE TABLE FORTEST
    ( gpno VARCHAR2(10 BYTE),
      classnumber  VARCHAR2(10 byte),
      age_min NUMBER,
      age_max NUMBER,
      amount NUMBER)
    INSERT statement:
    insert into fortest  (GPNO,classnumber,age_min,age_max,amount) values
    ('G123' , 01,0,29,1) 
    insert into fortest  (GPNO,classnumber,age_min,age_max,amount) values
    ('G123' , 01,30,35,2) 
    insert into fortest  (GPNO,classnumber,age_min,age_max,amount) values
    ('G123' , 01,36,40,3) 
    insert into fortest  (GPNO,classnumber,age_min,age_max,amount) values
    ('G123' , 02,0,29,1) 
    insert into fortest  (GPNO,classnumber,age_min,age_max,amount) values
    ('G123' , 02,30,35,2) 
    insert into fortest  (GPNO,classnumber,age_min,age_max,amount) values
    ('G123' , 02,36,40,5) 
    insert into fortest  (GPNO,classnumber,age_min,age_max,amount) values
    ('G123' , 03,0,29,1) 
    insert into fortest  (GPNO,classnumber,age_min,age_max,amount) values
    ('G123' , 03,30,35,2) 
    insert into fortest  (GPNO,classnumber,age_min,age_max,amount) values
    ('G123' , 03,36,40,3) 
    insert into fortest  (GPNO,classnumber,age_min,age_max,amount) values
    ('G124' , 01,0,29,1) 
    insert into fortest  (GPNO,classnumber,age_min,age_max,amount) values
    ('G124' , 01,30,35,2) 
    insert into fortest  (GPNO,classnumber,age_min,age_max,amount) values
    ('G124' , 01,36,40,3) 
    power required:
    gpno    classnumber    age_min    age_max    amount
    G123    1,3                0        29        1
    G123    1,3                30       35        2
    G123    1,3                36       40        3
    G123    2                  0        29        1
    G123    2                  30       35        2
    G123    2                  36       40        5
    G124    1                  0        29        1
    G124    1                  30       35        2
    G124    1                  36       40        3
    as for gpno g123, classnumber 1 and 3, the rates are the same in all the age_min and age_max they need to be grouped.
    even if gpno 123 classnumber 2 has the same rates as the classesnumber 1 and 3 for the age groups 0 to 29 and 30 to 35,
    rates are different for ages 36 to 40. so it should not be placed together. How can I do this in SQL

    any help is appreciated.

    Thanks in advance.

    Hello

    Thorny problem!

    Unfortunately, LISTAGG was created to the Oracle 11.2. About half of the complexity here is the aggregation of chain, i.e. forming the list of the classnumbers, as '1.3', using only functions available in Oracle 10.2.

    Here's a solution:

    WITH     got_gpno_classnumber_cnt   AS
    (
         SELECT     gpno, classnumber, age_min, age_max, amount
         ,     COUNT (*) OVER ( PARTITION BY  gpno
                                      ,            classnumber
                          )   AS gpno_classnumber_cnt
         FROM    fortest
    --     WHERE     ...     -- If you need any filtering, this is where it goes
    )
    ,     pairs          AS
    (
         SELECT    a.gpno
         ,       a.classnumber
         ,       MIN (b.classnumber)
                    OVER ( PARTITION BY  a.gpno
                              ,                    a.classnumber
                      )     AS super_classnumber
         FROM       got_gpno_classnumber_cnt  a
         JOIN       got_gpno_classnumber_cnt  b  ON   a.gpno     = b.gpno
                                      AND  a.age_min     = b.age_min
                                    AND  a.age_max     = b.age_max
                                    AND  a.amount     = b.amount
                                    AND  a.gpno_classnumber_cnt
                                            = b.gpno_classnumber_cnt
         GROUP BY  a.gpno
         ,            a.classnumber
         ,       b.classnumber
         HAVING       COUNT (*)     = MIN (a.gpno_classnumber_cnt)
    )
    ,     got_rnk          AS
    (
         SELECT DISTINCT
                 gpno, classnumber, super_classnumber
         ,     DENSE_RANK () OVER ( PARTITION BY  gpno
                                   ,                    super_classnumber
                                   ORDER BY          classnumber
                           )         AS rnk
         FROM    pairs
    )
    ,     got_classnumbers     AS
    (
         SELECT     gpno, classnumber, super_classnumber
         ,      SUBSTR ( SYS_CONNECT_BY_PATH (classnumber, ',')
                       , 2
                     )     AS classnumbers
         FROM     got_rnk
         WHERE     CONNECT_BY_ISLEAF = 1
         START WITH     rnk             = 1
         CONNECT BY     rnk             = PRIOR rnk + 1
              AND     gpno             = PRIOR gpno
              AND     super_classnumber  = PRIOR super_classnumber
    )
    SELECT DISTINCT
           g.gpno
    ,       c.classnumbers
    ,       g.age_min
    ,       g.age_max
    ,       g.amount
    FROM       got_gpno_classnumber_cnt  g
    JOIN       got_classnumbers         c  ON   c.gpno        = g.gpno
                                 AND  c.classnumber  = g.classnumber
    ORDER BY  g.gpno
    ,            c.classnumbers
    ;
    

    Out (just as you requested):

    GPNO       CLASSNUMBERS       AGE_MIN    AGE_MAX     AMOUNT
    ---------- --------------- ---------- ---------- ----------
    G123       1,3                      0         29          1
    G123       1,3                     30         35          2
    G123       1,3                     36         40          3
    G123       2                        0         29          1
    G123       2                       30         35          2
    G123       2                       36         40          5
    G124       1                        0         29          1
    G124       1                       30         35          2
    G124       1                       36         40          3
    
  • Is this a bug with the grouping sets?

    Version is the database of Oracle 11 g Enterprise Edition Release 11.2.0.3.0 - 64 bit Production
    SQL> with data as
      2  (select rownum r, 'X' x, 1 n from dual connect by rownum <= 10)
      3  select x
      4       , sum(n) s
      5       , (select sum(1) from dual where dummy = x) t
      6  from data
      7  group by grouping sets (x, ())
      8  /
    
    X          S          T
    - ---------- ----------
    X         10          1
              10
    SQL>  
    Shouldn't the superaggregate row have a 1 in the T column?

    Here's your QUERY with the addition of the GROUPING() function:

    SQL> WITH data AS
      2  (
      3     SELECT rownum r
      4          , 'X'    x
      5          , 1      n
      6     FROM   dual
      7     CONNECT BY rownum <= 10
      8  )
      9  SELECT GROUPING(x)
     10       , x
     11       , sum(n) s
     12       , (SELECT sum(1) FROM dual WHERE dummy = x) t
     13  FROM   data
     14  GROUP BY GROUPING SETS (x, ())
     15  ;
    
    GROUPING(X) X          S          T
    ----------- - ---------- ----------
              0 X         10          1
              1           10
    

    In this case, the value of X is zero because it is a subtotal line. If you look at this statement execution plan:

    PLAN_TABLE_OUTPUT
    ------------------------------------------------------------------------------------------------------------------------------
    SQL_ID  gumphwvgumqc4, child number 0
    -------------------------------------
    WITH data AS (  SELECT rownum r       , 'X'    x       , 1      n  FROM
      dual  CONNECT BY rownum <= 10 ) SELECT /*+gather_plan_statistics*/ x
        , sum(n) s      , (SELECT sum(1) FROM dual WHERE dummy = x) t FROM
     data GROUP BY GROUPING SETS (x, ())
    
    Plan hash value: 1718326399
    
    -----------------------------------------------------------------------------------------------------------------------------
    | Id  | Operation                       | Name | Starts | E-Rows | A-Rows |   A-Time   | Buffers |  OMem |  1Mem | Used-Mem |
    -----------------------------------------------------------------------------------------------------------------------------
    |   0 | SELECT STATEMENT                |      |      1 |        |      2 |00:00:00.01 |       0 |    |  |          |
    |   1 |  SORT AGGREGATE                 |      |      2 |      1 |      2 |00:00:00.01 |       4 |    |  |          |
    |*  2 |   TABLE ACCESS FULL             | DUAL |      2 |      1 |      1 |00:00:00.01 |       4 |    |  |          |
    |   3 |  SORT GROUP BY ROLLUP           |      |      1 |      1 |      2 |00:00:00.01 |       0 |  2048 |  2048 | 2048  (0)|
    |   4 |   VIEW                          |      |      1 |      1 |     10 |00:00:00.01 |       0 |    |  |          |
    |   5 |    COUNT                        |      |      1 |        |     10 |00:00:00.01 |       0 |    |  |          |
    |   6 |     CONNECT BY WITHOUT FILTERING|      |      1 |        |     10 |00:00:00.01 |       0 |    |  |          |
    |   7 |      FAST DUAL                  |      |      1 |      1 |      1 |00:00:00.01 |       0 |    |  |          |
    -----------------------------------------------------------------------------------------------------------------------------
    
    Predicate Information (identified by operation id):
    ---------------------------------------------------
    
       2 - filter("DUMMY"=:B1)
    

    The value of X is related to the subquery. If X is zero this returns no rows (I'm sure you already knew that :)). I would say it should although confusing behavior. You get the same results if you use CUBE or ROLLUP as well.

  • How to get the values based on the most recent date

    Oracle Version 8i



    How to get the new_value based on the most recent date

    SELECT max (MODIFIED_ON), the Group LOG_ITEM_CHARACTERISTICS by MODIFIED_ON new_value - does not

    Please, someone help me
    CREATE TABLE LOG_ITEM_CHARACTERISTICS
    (
      CHAR_LOG_ID          NUMBER(10)               NOT NULL,
      PIRM_ID              VARCHAR2(8)              NOT NULL,
      CONSTANT_FLAG        VARCHAR2(1),
      CHARACTERISTIC_NAME  VARCHAR2(25)             NOT NULL,
      TYPE_NAME            VARCHAR2(10)             NOT NULL,
      NEW_VALUE            VARCHAR2(3000),
      UOM                  VARCHAR2(10),
      MODIFIED_BY          VARCHAR2(30),
      MODIFIED_ON          DATE
    )
    
    SET DEFINE OFF;
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, UOM, MODIFIED_BY, MODIFIED_ON)
     Values
       (187376, '0307490N', 'N', 'OUTPUT CURRENT', 'PS2030/WVL', '1', 'AMPS', 'EMPXD88', TO_DATE('10/25/1999 00:00:00', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, UOM, MODIFIED_BY, MODIFIED_ON)
     Values
       (187377, '0307490N', 'N', 'OUTPUT VOLTAGE', 'PS2030/WVL', '54.9', 'VOLTS', 'EMPXD88', TO_DATE('09/22/1998 00:00:00', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, UOM, MODIFIED_BY, MODIFIED_ON)
     Values
       (187378, '0307490N', 'N', 'OUTPUT CURRENT', 'PS2030/WVL', '0', 'AMPS', 'EMDXB88', TO_DATE('09/22/1998 00:00:00', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, UOM, MODIFIED_BY, MODIFIED_ON)
     Values
       (187384, '0307490N', 'N', 'OUTPUT CURRENT', 'PS2030/WVL', '2', 'AMPS', 'EMAXC29', TO_DATE('11/10/2000 00:00:00', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, UOM, MODIFIED_BY, MODIFIED_ON)
     Values
       (187385, '0307490N', 'N', 'OUTPUT VOLTAGE', 'PS2030/WVL', '55.1', 'VOLTS', 'EMAXC29', TO_DATE('10/19/2001 00:00:00', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, UOM, MODIFIED_ON)
     Values
       (2400742, '0307490N', 'N', 'MEASURED LOAD ON PER', 'PS2030/WVL', '2', 'AMPS', TO_DATE('10/19/2001 00:00:00', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, UOM, MODIFIED_BY, MODIFIED_ON)
     Values
       (574093, '0307490N', 'N', 'MEASURED LOAD ON PER', 'PS2030/WVL', '2', 'AMPS', 'EMCTH88', TO_DATE('12/13/2002 11:55:16', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, UOM, MODIFIED_BY, MODIFIED_ON)
     Values
       (574094, '0307490N', 'N', 'OUTPUT VOLTAGE', 'PS2030/WVL', '54.9', 'VOLTS', 'EMCTH88', TO_DATE('12/13/2002 11:55:16', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, UOM, MODIFIED_BY, MODIFIED_ON)
     Values
       (3131486, '0307490N', 'N', 'MEASURED LOAD ON PER', 'PS2030/WVL', '6', 'AMPS', 'EMCTH88', TO_DATE('12/16/2004 14:31:14', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, UOM, MODIFIED_BY, MODIFIED_ON)
     Values
       (3131487, '0307490N', 'N', 'LAST MEASURED DATE', 'PS2030/WVL', '16-12-04', 'DD/MM/YY', 'EMCTH88', TO_DATE('12/16/2004 14:31:14', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, MODIFIED_BY, MODIFIED_ON)
     Values
       (3131488, '0307490N', 'Y', 'POWER SUPPLY', 'PS2030/WVL', 'ESSENTIAL', 'EMCTH88', TO_DATE('12/16/2004 14:31:14', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, UOM, MODIFIED_BY, MODIFIED_ON)
     Values
       (3131489, '0307490N', 'N', 'OUTPUT VOLTAGE', 'PS2030/WVL', '54.9', 'VOLTS', 'EMCTH88', TO_DATE('12/16/2004 14:31:14', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, UOM, MODIFIED_BY, MODIFIED_ON)
     Values
       (4759086, '0307490N', 'N', 'MEASURED LOAD ON PER', 'PS2030/WVL', '6', 'AMPS', 'EMRCT88', TO_DATE('11/15/2007 14:33:03', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, UOM, MODIFIED_BY, MODIFIED_ON)
     Values
       (4759087, '0307490N', 'N', 'OUTPUT VOLTAGE', 'PS2030/WVL', '54.9', 'VOLTS', 'EMRCT88', TO_DATE('11/15/2007 14:33:03', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, UOM, MODIFIED_BY, MODIFIED_ON)
     Values
       (4759088, '0307490N', 'N', 'LAST MEASURED DATE', 'PS2030/WVL', '14/11/07', 'DD/MM/YY', 'EMRCT88', TO_DATE('11/15/2007 14:33:03', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, UOM, MODIFIED_BY, MODIFIED_ON)
     Values
       (6646012, '0307490N', 'N', 'MEASURED LOAD ON PER', 'PS2030/WVL', '5', 'AMPS', 'PAUL DEVERILL', TO_DATE('01/06/2011 12:56:17', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, MODIFIED_BY, MODIFIED_ON)
     Values
       (6646013, '0307490N', 'Y', 'BATT TEST SET AT 3M', 'PS2030/WVL', 'null', 'PAUL DEVERILL', TO_DATE('01/06/2011 12:56:17', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, MODIFIED_BY, MODIFIED_ON)
     Values
       (6646014, '0307490N', 'Y', 'CAP ALARM INHIBITED', 'PS2030/WVL', 'null', 'PAUL DEVERILL', TO_DATE('01/06/2011 12:56:17', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, UOM, MODIFIED_BY, MODIFIED_ON)
     Values
       (6646015, '0307490N', 'N', 'OUTPUT VOLTAGE', 'PS2030/WVL', '55', 'VOLTS', 'PAUL DEVERILL', TO_DATE('01/06/2011 12:56:17', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, MODIFIED_BY, MODIFIED_ON)
     Values
       (6646016, '0307490N', 'Y', 'YR ROUTINES REQUIRED', 'PS2030/WVL', 'null', 'PAUL DEVERILL', TO_DATE('01/06/2011 12:56:17', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, MODIFIED_BY, MODIFIED_ON)
     Values
       (6646057, '0307490N', 'Y', 'BATT TEST SET AT 3M', 'PS2030/WVL', 'null', 'PAUL DEVERILL', TO_DATE('01/06/2011 13:03:18', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, MODIFIED_BY, MODIFIED_ON)
     Values
       (6646058, '0307490N', 'Y', 'CAP ALARM INHIBITED', 'PS2030/WVL', 'null', 'PAUL DEVERILL', TO_DATE('01/06/2011 13:03:18', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, MODIFIED_BY, MODIFIED_ON)
     Values
       (6646059, '0307490N', 'Y', 'YR ROUTINES REQUIRED', 'PS2030/WVL', 'null', 'PAUL DEVERILL', TO_DATE('01/06/2011 13:03:18', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, UOM, MODIFIED_BY, MODIFIED_ON)
     Values
       (6648577, '0307490N', 'N', 'MEASURED LOAD ON PER', 'PS2030/WVL', '6', 'AMPS', 'EMPXD88', TO_DATE('01/07/2011 13:35:45', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, UOM, MODIFIED_BY, MODIFIED_ON)
     Values
       (6648578, '0307490N', 'N', 'OUTPUT VOLTAGE', 'PS2030/WVL', '55', 'VOLTS', 'EMPXD88', TO_DATE('01/07/2011 13:35:45', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, MODIFIED_BY, MODIFIED_ON)
     Values
       (6648579, '0307490N', 'Y', 'YR ROUTINES REQUIRED', 'PS2030/WVL', 'NULL', 'EMPXD88', TO_DATE('01/07/2011 13:35:45', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, MODIFIED_BY, MODIFIED_ON)
     Values
       (6648580, '0307490N', 'Y', 'BATT TEST SET AT 3M', 'PS2030/WVL', 'NULL', 'EMPXD88', TO_DATE('01/07/2011 13:36:00', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, MODIFIED_BY, MODIFIED_ON)
     Values
       (6648581, '0307490N', 'Y', 'CAP ALARM INHIBITED', 'PS2030/WVL', 'NULL', 'EMPXD88', TO_DATE('01/07/2011 13:36:10', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, UOM, MODIFIED_BY, MODIFIED_ON)
     Values
       (6648634, '0307490N', 'N', 'MEASURED LOAD ON PER', 'PS2030/WVL', '5', 'AMPS', 'EMPXD88', TO_DATE('01/07/2011 13:51:06', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, UOM, MODIFIED_BY, MODIFIED_ON)
     Values
       (6648635, '0307490N', 'N', 'OUTPUT VOLTAGE', 'PS2030/WVL', '55', 'VOLTS', 'EMPXD88', TO_DATE('01/07/2011 13:51:06', 'MM/DD/YYYY HH24:MI:SS'));
    COMMIT;

    user4587979 wrote:
    Hi Frank

    Yes, but I had more than 2 tables with item_characteristics, type_characteristics

    If there are other tables involved, then CREATE TABLE and INSERT statements for them (for the relevant columns only). You must not post a lot of examples of data; usually just a couple of lines per table is enough to show the problem.
    Also post the results desired from these data.

    What I try to do is, I'm comparing new_value in log_item_characteristics (whichever is most recent) with CHR_VALUE in the item_characteristics and the needs of different output values

    I am trying to query is not giving desired out put

    Point out some places where the output is wrong and explain how you get good results in these places, using specific examples from the data sample.

    select  lic.PIRM_ID, ic.CHR_ID, lic.CHARACTERISTIC_NAME,
    lic.TYPE_NAME, ic.CHR_VALUE, lic.NEW_VALUE,  lic.MODIFIED_BY,  lic.MODIFIED_ON,
    ic.CREATED_BY, ic.CREATED_ON,ic.MODIFIED_BY, ic.MODIFIED_ON
    from log_item_characteristics lic, item_characteristics ic,type_characteristics tc  where
    lic.TYPE_NAME=tc.TYPE_NAME
    and lic.CHARACTERISTIC_NAME=tc.CHR_NAME
    and lic.PIRM_ID=ic.PIRM_ID
    and tc.CHR_ID=ic.CHR_ID and ic.CHR_VALUE <> lic.NEW_VALUE
    and lic.pirm_id in ('0307490N','0307521C')
    order by lic.pirm_id
    

    Thank you; It is useful to see the existing query. Really, you have to format your code.

    Please can you help me

    What you've posted so far is like saying "I'm going 200 meters to the North, and then 500 meters East, but I'm not getting where I want to go." I would have a better chance to help you if you said, 'I'm out of my house, at 100, Elm Street and try to get to the supermarket at Broadway 279. I'm going 200 meters to the North... ', or, even better. "I want to buy a newspaper and some orange juice, so I thought I'd go to a convenience store. I start at my house, at 100, Elm Street... »
    Always post some examples of data (CREATE TABLE and INSERT statements, as you did in your first post) and the desired results from these data. Explain how you get these results from these data.

  • How do I filter the JTable lines such as changing data

    Hello

    all suggestions are welcome, I'm at a bit of a dead-end at the moment.

    So, I have a JTable supported by a table model. The data in the table are likely to change while the system is running, when it does certain events are triggered. Table pattern listen to the appropriate events so he could work on what line in the table must be updated, I can call then through the
    int row = determineWhichRow( changedDataObject );
    fireTableRowsUpdated( row, row );
    Correctly, this causes the row in the table to be updated. Now, the bit that's not going to. The user is able to activate filters on the table, more precisely on an attribute of the data in this table that changes. So when I raise the updated event I need to my line (with the filter set) re sorter - sort the table. Have a look there is a method on line sorter:
    getSortsOnUpdate()
    that the Javadoc, I thought I would create the behavior that I needed - assuming that I told it to return true. This after trying the functionality remains the same, that the data model changes, update the values in the table but the filters don't are not reapplied.

    Debugging in the code of the jdk to get an idea of what might happen on this subject seems that filters are called and it determines that the modified line must be filtered, but gets to a point where it was decided that because the event from the table model was an event of update should not call a repaint and resizing method and nothing seems to happen.

    I think that simply re-defining the line on the table sorter would cause the desired effect but would be incredibly inefficient with a data model that can potentially change at any time. I can put the specific line number and the jdk version if this will help anyone, but I hope that you all will be able to give me an idea of what I might have missed.

    Thank you

    Dan.

    Hello

    Thanks for the update and the NBS.

    I tested my 'Hammer' solutions in the SOFTWARE, and they work.

    then sorterChanged is true, nothing is being edited so the first block is not entered, then the second block when a method of resizeAndRepaint - that sounds more useful since it seems that repaint correct is missing - is not entered because the event is an UPDATE.

    It reminds me that referred explicitly to the javadoc for setSortsOnUpdate + "by example, if this is true, and that the user modifies an entry the location of this element in the view can change." The default value is false. ' +, so apparently they had mounting in mind and not other consequences, such as filtered lines by changing the number of lines and the line of the table positions.

    The resizeAndRepaint is only call revalidate and which I've tried first JTable #tableChanged repaint (earlier in the call tree) and call revalidate and paint - I don't know how much of the impact that could have on performance.

    Probably the same impact on one than the other methods of Hammer (I don't know paint involves sorting and filtering, which would frustrate the purpose of caching the results of sorting; have you tried and it works?).

    I also notice in the private method DefaultRowSorter.shouldOptimizeChange () , which is called somewhere at the treatment of the update of the line, that the code checks to see if the change is over one-tenth (and Yes, the ten are hardcoded!) lines and doesn't force not re - sorting so this isn't... With the explicit comment 'changed too, sort all this '. I really wonder how much they paid the consequences of updates when sorting/filtering...

    Tables in general should not have more than a few hundred lines, but there are four of them in the client at any time. There are two different branches of data types and two different periods, the tables are for.
    As you say if this does not work, "hammer" approach is all that remains... Thanks for having the eye well.

    Revisit this point: I don't see how you could save a full repaint anyway: If the results of change of model in the first row being filtered, all lines must be repainted (a place), and even a new line can be displayed at the bottom. Yet once if painting involves sort, has no way around sorting in any case, this isn't worth trying to avoid the kind.
    I agree that this should be handled automatically (and I consider a bug because it's not).

    In fact if you fireRowUpdated (i-1, i) (test quick hacky-ish), you will notice that the two rows are properly painted and shift, but not the rest of the table (which should be moved to the top line). This is clearly a bug, it seems that the JTable only redraws the line range in the case of the update, not taking into account that changes of impluies new kind other indices of line outside this range.

    * In short: rowupdated in the presence of a sorter/filter should involve the use/filtering and if necessary to repaint, of the whole table. and this should be in the stock of JDK, not imposed the application code to find

    Published by: jduprez on June 29, 2011 13:23

  • HOW to: Filter data in an html CFGRID with the defined query attribute tag

    Does anyone know how can I filter data in an html cfgrid, not through a link from AJAX, but perhaps by exposing some of the features of the code behind the controls cfgrid EXT?

    Any help would be greatly appreciated.

    --
    Jorge loyo

    I have it!

    MY ENTRY:

    <>
    ID = "searchString".
    name = "searchString".
    Type = "text".
    OnKeyUp is "ColdFusion.Grid.getGridObject('dg'). GetDataSource () .filterBy (myfilterfunc)"/ >

    MY FUNCTION

    MY GRID:

    <>
    name = "dg".
    Query = "employees".
    format = "html" >



  • How to divide the data in the column based identifier

    Hello

    I use the oracle database.
    I have data in this format in my column 1234 ~ 2345 ~ 3456 ~ 4567.

    I need a motion to split the data in the column based on the identifier ' ~', so that I can choose the value after the second occurrence of the identifier.


    Do I know who can do this.

    Published by: 962987 on October 3, 2012 12:11

    Hello

    Welcome to the forum!

    Whenever you have any questions, please post CREATE TABLE and INSERT statements for some examples of data and the results desired from these data. For example, in view of these data

    CREATE TABLE     table_x
    (       my_column     VARCHAR2 (40)
    );
    
    INSERT INTO table_x (my_column) VALUES ('1234~2345~3456~4567');
    INSERT INTO table_x (my_column) VALUES ('just~2 parts');
    

    I think you're asking for these results

    PART_3     MY_COLUMN
    ---------- ----------------------------------------
    3456       1234~2345~3456~4567
               just~2 parts
    

    I suppose that, if the string does not contain at least 2 ' ~ s, you want to return null. It's a good idea to explain what you want like that for special cases and include examples in your sample data and results.

    Not all versions of Oracle are exactly the same. In fact, they are all different. If you want the best solution that works with your version, then say what version it is.
    The following query will work in Oracle 10.1 and higher:

    SELECT  REGEXP_SUBSTR ( my_column
                    , '[^~]+'
                    , 1
                    , 3     -- 3rd occurrence (after 2nd delimiter)
                    )     AS part_3
    ,     my_column          -- if wanted
    FROM    table_x
    ;
    

    See the FAQ forum {message identifier: = 9360002}

    Published by: Frank Kulash, October 3, 2012 15:24
    Adding sample data and results.

  • How can we use the function of group based on time

    Hai sir

    I had a table containing fields

    EMPCODE NUMBER
    EMPNAME VARCHAR2 (25)
    BAR CODE VARCHAR2 (25)
    VARCHAR2 (25) RESPONDENT
    OUTTIME VARCHAR2 (25)
    INTRTIMEIN VARCHAR2 (25)
    INTROUTTIME VARCHAR2 (25)
    PERTIMEIN VARCHAR2 (25);
    PERTIMEOUT VARCHAR2 (25);
    DATE OF ATTEND_DATE;


    Who has six columns of time and I need to use the group function
    For example
    0815,0817,1230,1250,1645,1648,

    0815 should store in timein
    0817 must store in intrtimein
    1250 need to store in pertimein
    1230 must store in pertmeout
    1645 must store in intrtimeout
    1648 must store in the time-out period

    If it is possible using max and min function pls tell me.

    Thanks and greetings

    Srikkanth.M

    Hi, Srikanth,

    It would help a Lopez, if you posted CREATE TABLE and INSERT statements for a few lines of sample data and the results desired from these data.
    If you want a solution that works in your version of Oracle, say what is your version of Oracle.

    Are you trying to sort columns?
    In other words, you are waying that people can enter data in the six columns, in any order, and you want to reorder the values so that
    respondent<= intrtimein=""><= pertimein=""><= pertimeout=""><= introuttime=""><=>

    If so, you can unpivot data in 6 lines, use the ROW_NUMBER analytic function to number the lines in the order and their pivot then back in order:

    MERGE     INTO     table_x          dst
    USING     (     WITH  cntr as
              (       SELECT     LEVEL     AS n
                   FROM     dual
                   CONNECT BY     LEVEL     <= 6
              )
              ,     unpivoted     AS
              (     SELECT     t.empcode
                   ,     CASE     c.n
                             WHEN  1  THEN  intime
                             WHEN  2  THEN  outtime
                             WHEN  3  THEN  intrtimein
                             WHEN  4  THEN  introuttime
                             WHEN  5  THEN  pertimein
                             WHEN  6  THEN  pertimeout
                        END     AS tm
                   FROM          table_x     t
                   CROSS JOIN     cntr     c
              )
              ,     got_rnum     AS
              (
                   SELECT     empcode
                   ,     tm
                   ,     ROW_NUMBER () OVER ( PARTITION BY  empcode
                                            ORDER BY          tm
                                        ) AS rnum
                   FROM     unpivoted
              )
              SELECT       empcode
              ,       MAX (CASE WHEN rnum = 1 THEN tm END)     AS intime
              ,       MAX (CASE WHEN rnum = 2 THEN tm END)     AS intrintime
              ,       MAX (CASE WHEN rnum = 3 THEN tm END)     AS perintime
              ,       MAX (CASE WHEN rnum = 4 THEN tm END)     AS perouttime
              ,       MAX (CASE WHEN rnum = 5 THEN tm END)     AS introuttime
              ,       MAX (CASE WHEN rnum = 6 THEN tm END)     AS outtime
              FROM       got_rnum
              GROUP BY  empcode
         ) src
    ON     (dst.empcode     = src.empcode)
    WHEN MATCHED THEN UPDATE
    SET     dst.intime     = src.intime
    ,     dst.outtime     = src.outtime
    ,     dst.intrtimein     = src.intrintime
    ,     dst.introuttime     = src.introuttime
    ,     dst.pertimein     = src.perintime
    ,     dst.pertimeout     = src.perouttime
    ;
    

    It should work in Oracle 10 (and more).
    The PIVOT and UNPIVOT features introduced in Oracle 11 can make it a little simpler.

    Perhaps it would be better to require users to enter data in the right-hand columns.
    You can use CHECK constraints to ensure that intimate<= intrtimein=""><= pertimein=""><= pertimeout=""><= introuttime=""><=>

  • How to write Save function based on the drop-down list box selection data in app mxml flex4 with as3

    Hi all

    I'm working on the application web flex4 with as3.

    I have a doubt, I've created a mxml it has two text boxes, except the button and a combo box that is has two option as a percentage and the amount.

    my needs are I gave here.

    need 1: when I choose option amount that two text boxes does not have to be editable.when I select text tat box two percentage option will be editable.

    need 2: when I select the percentage in combox option and two text boxes are empty, and then click the button Save-> I want to display warning msg

    need 3: when I select the option amount combox and the two boxes are emptu click the button Save-> I don't want any warning messages.

    How to validate it and how to write backup for this function.

    This is my sample code:

    list box ID = baseAmtPer

    ID TextBox1 = maxCommAmt.text

    ID = baseAmtPer.text text box

    If (((baseAmtPer.editable!=true) & & (maxCommAmt.editable! = true)) & & ((baseAmtPer.text=="") & &(ma xCommAmt.text=="")) |) (baseAmtPer.text == "") | (maxCommAmt.Text=="")) -> This condition not allowing while I'm selecing amount in combo box. How the TWO TEXT BOX WILL BE EMPTY for this problem

    {

    Alert.Show ("enter in all areas", "Information");

    }

    on the other

    {

    some encodings

    }

    Hello

    Please go through the following Code:

    http://ns.Adobe.com/MXML/2009.

    xmlns:s = "library://ns.adobe.com/flex/spark".

    xmlns:MX = "library://ns.adobe.com/flex/mx" minWidth = "955" = "600" minHeight >

    Import mx.collections.ArrayCollection;

    Import mx.controls.Alert;

    Import spark.events.IndexChangeEvent;

    protected function button1_clickHandler(event:MouseEvent):void

    {

    If (comboBox.selectedItem == "Percentage" & textBox1.text == "" & textBox2.text == "") {}

    Alert.Show ("enter the values");

    }

    }

    protected function comboBox_changeHandler(event:IndexChangeEvent):void

    {

    {if(ComboBox.SelectedItem=="Amount")}

    textBox1.editable = false;

    textBox2.editable = false;

    }

    else {if(comboBox.selectedItem=="Percentage")

    textBox1.editable = true;

    textBox2.editable = true;

    }

    }

    ]]>

    Amount

    Percentage

    Thank you and best regards,

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

    Vibhuti Gosavi . [email protected] | www.infocepts.com

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

  • Reset Color Palette of the group filter graduated... How?

    After the color palette using graduated filter Panel, I can't reset it so that there is no applied hue.  All other functions resets when I use Alt/double click but not the function of the color.  Can you get it someone please let me know what I need to do?  I am currently using the 3.3RC version of LR.

    Thank you

    Double-click the word effect (this resets everything including the color picker)

    or

    Open the color palette, drag the saturation slider in the lower to zero.

  • jdev11 - how the code filter additional liaison with radio buttons?

    Using JDev 11.1.1.0.2, ADF BC for model, ADF Faces JSF to view, deploy to WebLogic 10.3 appserver, database Oracle 11

    I asked for help (a do my work ask), that I'm the only developer JDev in our shop, and I looked at this problem too long and now have obscured the problem. I don't really want the answer (rather the skills needed to solve this problem), but it will ;-)

    Installation program:
    ExecwithParam base where the logic is stored in the AppModule. At this point, there is only a single binding TechID variable, which is passed to four of your different and updates the where clause and calls on each VO of the AppModule executeQuery. Works great so far!

    Need:
    Add additional time based filter: Group of buttons on the Radio for the last 30 days, 60 days, 90 days, choose a date. If choosing a date is sΘlectionnΘe, then the user selects a date with a date picker, and all records by this date are used.

    Support:
    There is a date variable in each query, and a common type of DATE filterDate may be added to each to filter with somedatefield > =: filterDate in each VO

    Thoughts:
    I like to break things in simple parts, so how about starting just the radio button.
    My thinking goes like this:
    Add another variable of filterDate liaison to each of your. Add this to the App Module.

    So, how can I set up a radio button so that I can get the value of the selected and then button that convert a SYSDATE - value and which use th e App Module logic? I continue to think of the big picture end of case and forget everthing. I know that's not difficult, but just ask me for some advice.

    At one point, I was thinking to add a clove of support to the option button, then wasn't sure if it was the best way and don't know how I would get the value in the AppModule. Part of the problem is that I came across a mental block. If I add the components that aren't linked data, as a selector of dates, or checkboxes, radio buttons, etc.. How can I get the values in the AppModule? I've seen many examples of data to related components, but do not know how to mix and match the binding with just a rich component controls base such as an input control. (This may better ask in a different thread).

    Finally, what of the big picture, the part about the addition of the datePicker - of ideas?

    Like cable TV, characters hosted - the kind that are related in my case the code! (Reference of American humor, must be familiar with USA cable TV channel (I'm addicted to the show House))

    Thank you, Ken

    Ken,

    A small correction to your last sentence - you don't want to refer to the support of the AM bean - you want to refer to the AM of the bean to support.

    If you want a very simple way: find the service for your AM method in the data control palette, drag-and - drop it on your page as a button JSPX. JDeveloper will automatically add a binding for the action in the pagedef. Then, double-click the button that results and create a new method of bean of support for her (in front of JDev, don't remember what we call the dialog box) - given the option, say JDev to put the code to link to you - then the resulting method should have the code that calls the method via the definition of the page. Simply add a bit of extra code to determine and set the date.

    John

  • Watch does not recognize the weight class as exercise-how can you add the duration of activity manually because none of the presets eg elliptical etc. is appropriate. Also does not count calories for example 35 when the rest of the group is around 500

    Look does not recognize the weight class as exercise-how can you add the duration of activity manually because none of the presets etc for example elliptical is appropriate and therefore do not count toward the daily goal. Also does not count calories for example 35 when the average of the others in the group is around 500.

    Hello

    When you use the application of the training session, choose the type of activity that best fits your business. For anything else - like weight - select the other category.

    During the follow-up of one year to the next helps:

    • Activity app will credit the ring of progress of exercise with one minute for every minute of the workout.
    • Active calories will be based on the data recorded by the heart rate sensor or a brisk walk, whichever is greater.

    Note, however, that the heart rate sensor is likely to give better results for the workouts that involve rhythmic (for example running) rather than the irregular movements.

    More information:

    Use of the workout on your Apple Watch - Apple Support

  • HOW TO FILTER DATA IN MICROSOFT ACCESS

    HOW TO FILTER DATA IN MICROSOFT ACCESS BASED ON THE DATE AND TIME AND GIVE THE RESULT IN A TABLE?

    I need a few examples of files, can someone help me please?

    Fix your keyboard. If it has not been broken, be a little more polite and stop screaming.

    Research, are thousands of examples on the web related to the jet and sql database. This is a very basic select statement. Access to a query wizard that can then show the sql code. If you don't know how to design a query in access, you need a Basic for this tutorial. No question of LabVIEW here.

  • How to group by field derived for the field value below?

    Hi all

    I class field with the name of CLASS_FLD data item, I want to group by on left(CLASS_FLD,2).

    How to write him group by for the left(class_FLD,2) of expression above?

    I used earlier messages based on the syntax below but I am unable to make the Group

    <? for-each - group: row; xdoxslt:left(./CLASS_FLD,2)? > <? type: xdoxslt:left (current-group () / CLASS_FLD, 2); ' ascending '; data-type = "text"? >

    Thank you and best regards,

    1157496 wrote:

    Give me the syntax for the first group of lines BY expression counts.

    and also how the syntax would be if he is Businessunit group then group by expression (left(account,2)

    Mean you nested groups, first group BUSINESSUNIT and then other group ACCOUNT

    If yes then the internal group based on the ACCOUNT, we could watch as below

    for-each - Group: Current - Group (); xdoxslt:Left(./Account,2)? >

    For example

    . . . .

Maybe you are looking for