Create table with several Collections of data control

Hello

I have a requirement about to display data in a table. It shows simple, but certain columns in the table are within a collection, and the others are in another collection. I read this chapter Creation of ADF Databound Tables - 11 g Release 1 (11.1.1.7.0), and she explains to create the table with a collection.

I have no knowledge on the model, I know just as control data, so what should I do? :

-Ask for the template designer to redraw the control of data to include a collection with all the data?

-Try to work with the actual data control? If so, how can I create the table several Collections of data control?

Plese let me know if there is another solution. I work with JDeveloper 11.1.1.7.

Thank you!

AAPDL

Hello

You can have a managed bean that e... g exposes an ArrayList of objects. This can then binds to the value property of the table. If the object sets the information of table row combination that you get multiple iterators (collections), then the table will display the joined data.

Frank

Tags: Java

Similar Questions

  • Save data in several collections of data control

    Hello

    In another post (https://forums.oracle.com/message/11094155), I asked how to merge data from several collections and display it in a table. FrankNimphius gave me the right answer. I now have my table with merged data from my control of data collections. But now I have reverse request: the table must allow to insert new lines and to store the data in the model represented by all of these collections.

    I saw this blog https://blogs.oracle.com/jdevotnharvest/entry/how_to_add_new_adfand it is great, but works with a collectionModel, but the idea is exactly the same thing, just with several collectionModels in a parent one.

    The table is not lined with a collectionModel, it is bounded to a list < MyObject > in my managed bean, in order to control the integrated data to create/delete operations from the parent collection do not work.

    Another thing is: for me the model is a black box, I don't know anything about the model, I just know the datacontrol.

    Thank you!

    AAPDL

    Hello

    If you only have access to the data controls then it has no option to combine the two data sources in a single data control (for example, Pojo). Go with a suggested abstraction managed bean, the option I see is to expose a method in the managed bean that you can use to create a new empty - list entry. This then will be displayed as a blank line in the table after PPR.

    The trickiest part is later - when you submit or commit the new line - to manually create new lines in other iterators or update other data sources accordingly (for which you will need to know what information goes on what iterator control or data). If other data controls are not BC of the ADF, and then to persist new lines, you will need to explicitly call the methods exposed on the data controls. So what you basically generate is a managed implementation bean of a two-phase commit. And then there's the case of deletion to consider as well.

    Frank

  • Even table with values of different data controls

    JDev ADF BC Web services 11.1.1.5.0

    I have an array element in the user interface and two controls of data with the same set of attributes.
    One is a data based VO control and another is a data bean control in which attributes will fill a web service.

    I display a tabled text entry, a search button, and a table to the page.
    Now, if I get the value of parameter of the Webservice, the table automatically displays table of results of the Web service data control.
    And if not, the table must be empty and then it should belong the VO control data base.

    User af:switch for this component. A side holds the web service table and the other the vo we. The condition for the switch is the result of the web service call.

    Timo

  • Bind several web service data controls on the same page

    Hello
    JDev version: 11.1.1.6.0
    I using SOAP web services. I have the following usage:
    I have the data control for the web service, that records the values entered into the form. I created the entry form using the data control (DC1).
    There is an input field [T1], on the tab, I need to fill an another text field, for which the data is returned to an another web service (DC2) data control.
    For the same input text [T1] on the tab out, I need fill in the object list in the component selectonechoice, for which the data is returned to an another web service (DC3) data control.

    Is it possible to use bind several data controls on the same page to reach the use case?
    However, I want to avoid the use of managed bean. Is it possible to do this?

    Concerning
    Fabiola

    Hello

    I can make the case to use even without the use of the managed bean?

    Yes, although the managed bean solution seems reasonable to me.

    Difficulties are

    + 1) REQ1 and REQ2 are the parameters that is common to both 1 and 3 services. +

    Text fields that provide arguments to a method are related to an input variable (file PageDef has an iterator variable in the executable section). A variable can be referenced from method arguments

    + 2) REQ1 is the parameter that is common to both 2 and 3 services. +

    Identical to 1. Create a setting for service 2 and map variables in the arguments of the method of service 3

    + 3) Service3 needs all REQ1, REQ2, REQ3, and REQ4 parameters as parameters to save the data. +

    As said, fields can be referenced from variables, dependent, the linking of the attribute fields (as I guess it is a return value in the bound field)

    There are problems of links as the same setting is available between several departments.

    It's new to me

    Is it possible to solve these problems of binding addresses?

    Yes. Make sure however that WS DC iterators you see in PageDef have their property Refresh ifNeeded for the refreshment of the bound field work properly

    Frank

  • Create table with overlapping parallel dates in individual columns

    I try to combine data from two different tables into a single table.

    The data in table 1 contains locations of patients in a hospital where each record represents a single location. Patients can be transferred several times between the different beds resulting from multiple records for a single visit.

    The data in table 2 contains the operative activity of the patient to the Hospital where each record represents either the GOLD of the suspension of the recovery room. A patient may have multiple operations in a single visit.

    I would like to join/merge/mashup data in a single table that contains the data parallel to each other. In other words, dates of the appliance on one side of the table and the activity of GOLD on the other. The difficulty is that the two sets of overlapping of dates of arrival and departure. I wish that the final table to divide the originals in new records when the overlaps do not coincide.

    Example:

    Original in both events (one per table)

    > Unit event has - from 14:00 to 18:00

    > OR event B - from 16:00 to 17:00

    Results in 3 documents (in the final)

    > Event 1 - unit from 14:00 to 16:00, null dates GOLD

    > Event 2 - unit from 16:00 to 17:00 OR 16:00 to 17:00

    > Event 3 - unit from 17:00 to 18:00, null dates GOLD

    Of course overlap can be more complex than the example above and adding code to indicate the 'ghosts' transfers to as well.

    In the code below, the first visit of the GOLD occurs during the first mention of the unit.

    Jason

    Oracle 10g

    [code]

    create the table delme_Unit_dates

    (id varchar2 (20))

    , unit_rcd_id varchar2 (20)

    , Unit_desc varchar2 (20)

    Unit_in_code char (1)

    Date of Unit_in_dttm

    Date of Unit_out_dttm

    Unit_out_code char(1));

    create the table delme_or_dates

    (id varchar2 (20))

    , OR_rcd_id varchar2 (20)

    , OR_desc varchar2 (20)

    OR_in_code char (1)

    Date of OR_in_dttm

    Date of OR_out_dttm

    OR_out_code char(1));

    create the table delme_all_dates

    (id varchar2 (20))

    , Unit_OR_id varchar2 (40)

    , Unit_rcd_id varchar2 (20)

    , Unit_desc varchar2 (20)

    Unit_in_code char (1)

    Date of Unit_in_dttm

    Date of Unit_out_dttm

    Unit_out_code char (1)

    , OR_rcd_id varchar2 (20)

    , OR_Desc varchar2 (20)

    OR_in_code char (1)

    Date of OR_in_dttm

    Date of OR_out_dttm

    OR_out_code char (1));

    insert into delme_unit_dates values ('123456', 'U1111', 'Unit A', 'A', to_date('2013-04-29 5:02:00 PM', 'yyyy-mm-dd hh:mi:ss am'), to_date('2013-05-09 1:06:00 PM', 'yyyy-mm-dd hh:mi:ss am'), 'B');

    insert into delme_unit_dates values ('123456', 'U1112', 'Unit A', 'B', to_date('2013-05-09 1:06:00 PM', 'yyyy-mm-dd hh:mi:ss am'), to_date('2013-05-09 4:53:00 PM', 'yyyy-mm-dd hh:mi:ss am'), 'B');

    insert into delme_unit_dates values ('123456', 'U1113', 'Unit A', 'B', to_date('2013-05-09 4:53:00 PM', 'yyyy-mm-dd hh:mi:ss am'), to_date('2013-05-10 10:52:00 PM', 'yyyy-mm-dd hh:mi:ss am'), 't');

    insert into delme_unit_dates values ('123456', 'U1114', ' unity, 't', to_date('2013-05-10 10:52:00 PM', 'yyyy-mm-dd hh:mi:ss am'), to_date('2013-05-11 11:30:00 AM', 'yyyy-mm-dd hh:mi:ss am'), 'B' ");

    insert into delme_unit_dates values ('123456', 'U1115', ' unity, ' B', to_date('2013-05-11 11:30:00 AM', 'yyyy-mm-dd hh:mi:ss am'), to_date('2013-05-12 4:00:00 PM', 'yyyy-mm-dd hh:mi:ss am'), 'B');

    insert into delme_unit_dates values ('123456', 'U1116', ' unity, ' B ', to_date('2013-05-12 4:00:00 PM', 'yyyy-mm-dd hh:mi:ss am'), to_date('2013-05-16 2:14:00 PM', 'yyyy-mm-dd hh:mi:ss am'),' t ');

    insert into delme_unit_dates values ('123456', 'U1117', 'Unit Z', ', to_date('2013-05-16 2:14:00 PM', 'yyyy-mm-dd hh:mi:ss am'), to_date('2013-05-17 2:26:00 PM', 'yyyy-mm-dd hh:mi:ss am'), 'B');

    insert into delme_unit_dates values ('123456 ', 'U1118', 'Unit Z', 'B', to_date('2013-05-17 2:26:00 PM', 'yyyy-mm-dd hh:mi:ss am'), to_date('2013-05-20 11:30:00 AM', 'yyyy-mm-dd hh:mi:ss am'),');

    insert into delme_or_dates values ('123456', 'OR2221', 'or 1', 'O', to_date('2013-05-09 7:35:00 AM', 'yyyy-mm-dd hh:mi:ss am'), to_date('2013-05-09 10:56:00 AM', 'yyyy-mm-dd hh:mi:ss am'), 'R');

    insert into delme_or_dates values ('123456', 'OR2222', ' 5', 'R', to_date('2013-05-09 10:56:00 AM', 'yyyy-mm-dd hh:mi:ss am'), to_date('2013-05-09 3:20:00 PM', 'yyyy-mm-dd hh:mi:ss am'), 'U');

    insert into delme_or_dates values ('123456', 'OR3331', 'or 2', 'O', to_date('2013-05-16 7:59:00 PM', 'yyyy-mm-dd hh:mi:ss am'), to_date('2013-05-16 10:43:00 PM', 'yyyy-mm-dd hh:mi:ss am'), 'R');

    insert into delme_or_dates values ('123456', 'OR3332', ' 8', 'R', to_date('2013-05-16 10:43:00 PM', 'yyyy-mm-dd hh:mi:ss am'), to_date('2013-05-17 11:20:00 PM', 'yyyy-mm-dd hh:mi:ss am'), 'U');

    commit;

    -Is far from what we

    Select

    U.*

    , o.*

    Of

    delme_Unit_dates U

    delme_OR_dates O

    where

    U.ID = o.id

    and U.UNIT_IN_DTTM < = O.OR_IN_DTTM

    and U.UNIT_OUT_DTTM > = O.OR_IN_DTTM

    order of U.UNIT_IN_DTTM, O.OR_IN_DTTM

    ;

    [/ code]

    Post edited by: Jason_S (changed a single date ' 2013 - 05 - 16 15:20 ' to ' 2013 - 05 - 09 15:20 ')

    Hi, Jason.

    Jason_S wrote:

    I edited one of the dates in the original post.

    Also although the inpatient unit and OR events are contiguous for a given patient (no overlap and without gaps - after that data are cleaned).

    ...

    The sample data you posted a of gaps in the data of the GOLD.  It is correct that the solution below works or not there are gaps in the two tables.

    WITH got_dttm AS

    (

    SELECT unit_in_dttm AS DTMC

    OF delme_unit_dates

    UNION

    SELECT unit_out_dttm AS DTMC

    OF delme_unit_dates

    UNION

    SELECT or_in_dttm AS DTMC

    OF delme_or_dates

    UNION

    SELECT or_out_dttm AS DTMC

    OF delme_or_dates

    )

    all_periods AS

    (

    SELECT DTMC AS in_dttm

    , (DTMC) ahead OF (ORDER BY DTMC) AS out_dttm

    OF got_dttm

    )

    SELECT NVL (u.id, o.id) as id

    u.unit_rcd_id

    u.unit_desc

    u.unit_in_code

    p.in_dttm

    p.out_dttm

    o.or_rcd_id

    o.or_desc

    Of all_periods p

    LEFT OUTER JOIN delme_unit_dates u WE u.unit_in_dttm<=>

    AND u.unit_out_dttm > = p.out_dttm

    LEFT OUTER JOIN delme_or_dates o WE o.or_in_dttm<=>

    AND o.or_out_dttm > = p.out_dttm

    WHERE p.out_dttm IS NOT NULL

    ORDER BY p.in_dttm

    ;

    You can use the query above to CREATE or a CREATE TABLE... AS command.

    If you have as much data as you say, a table or materialized view would be maybe faster to use.

    You will notice that I do understand not all columns; I would like to know if you have a problem, including them.

    I don't know what id role plays in this problem.  It is difficult to say when all rows have the same value.

  • Unable to create cache with several tables group

    Hello

    I need to create a group of cache with several tables, which are referential to the other.

    There are 2 related tables and table 1 child...
    While trying this thing, it gives me an error:

    8222: multiple parent tables found

    It is not possible to use several tables of root in a single cache group? Is there another way to use it?

    Script, I used is:

    create a cache group asynchronous writethrough TEST. CG1
    of the TEST. ROOT1)
    KEY PRIMARY ID VARCHAR2 (8 BYTES),
    NAME VARCHAR2 (50 BYTE),
    DESCRIPTION VARCHAR2 (255 BYTE),
    POLICYTYPEID VARCHAR2 (7-BYTE)),

    TEST. ROOT2)
    PARAMTYPEID VARCHAR2 (5 BYTES) PRIMARY KEY,
    PARAMETERUSAGE VARCHAR2 (1 BYTE),
    NAME VARCHAR2 (25 BYTE),
    DESCRIPTION VARCHAR2 (255 BYTE)),

    TEST. CHILD1)
    PARAMDETAILID NUMBER (20) PRIMARY KEY,.
    ID VARCHAR2 (8 BYTE),
    PARAMETERUSAGE VARCHAR2 (1 BYTE),
    DISPLAYVALUE VARCHAR2 (255 BYTE),
    OPERATORID VARCHAR2 (5 BYTE),
    VENDORID NUMBER (20).
    FOREIGN KEY REFERENCES TEST. ROOT1 (ID),
    TEST KEY (PARAMETERUSAGE) REFERENCES STRANGERS. ROOT2 (PARAMETERUSAGE));

    You can't have multiple root within a group of cache tables. The requirements for tables in the group a cache are very strict; There must be only one top-level (root table) table and there may possibly be several children tables. Tables of the child should be linked through foreign keys to the root table or a child table above in the hierarchy.

    The solution for your case is among the tables of root and the other root table in a separate cache group and the child table in a cache group. If you do this, you must take care of a few things:

    1. you cannot define foreign keys between the tables of groups of different cache in TimesTen (keys may exist in Oracle) so the application must enforce referential integrity itself for these cases.

    2. If you load data in a cache group (using LOAD the GROUP CACHE or "load we demand") and Timesten will not automatically load the corresponding data in the other group of cache (since he doesn't know the relationship). The application must load the data into the other group of cache explicitly.

    There is no problem with transactional consistency when changes are pushed to Oracle. TimesTen maintains and reinforces the coherence transactional regardless of how the tables are arranged in groups cache correctly.

    Chris

  • query to display data in table with several detail table

    Hi all

    I have a few cases with a table header that have more than 3 table of detail, and I have to generate the query to show all the data horizontally.

    tblHdr have column A (PK)

    tblDtl1 have column A (FK), B (PK)

    tblDtl2 have column A (FK), C (PK)

    tblDtl3 have column A (FK), D (PK)

    and I need a query to display data like this:

    AB1C3D1
    AB2C4D2
    AC5D3
    AC6

    all the Details of the table should display data based on the relationship of tblHdr (A).

    tblDtl1 have only 2 rows of data for the FK A

    tblDtl2 just for FK 4 lines of data

    tblDtl3 only 3 lines of data for the FK A

    Another example:

    AB1C1D1
    AB2C2
    A

    B3

    tblDtl1 only 3 lines of data for the FK A

    tblDtl2 have only 2 rows of data for the FK A

    tblDtl3 have only 1 rows of data for the FK A

    Please shed some light. for the record, I'll use this query in ADF, so I'll put using PLSQL in second priority.  I prefer to do it in the SQL query.

    Thank you

    Here are 3 ways. First test of data:

    drop table ta purge;
    create table ta as
    SELECT 'A' AS A FROM dual
    union all
    select 'B' from dual;
    
    drop table tb purge;
    create table tb as
    SELECT 'A' AS A, 'B1' AS B FROM dual
    UNION ALL
    SELECT 'A', 'B2' FROM dual ;
    
    drop table tc purge;
    create table tc as
    SELECT 'A' AS A, 'C1' AS C FROM dual
    UNION ALL
    SELECT 'A', 'C2' FROM dual
    UNION ALL
    SELECT 'A', 'C3' FROM dual
    UNION ALL
    SELECT 'A', 'C4' FROM dual ;
    
    drop table td purge;
    create table td as
    SELECT 'A' AS A, 'D1' AS D FROM dual
    UNION ALL
    SELECT 'A', 'D2' FROM dual
    UNION ALL
    SELECT 'A', 'D3' FROM dual;
    

    Now 3 solutions: full join, group by and pivot:

    with b as (
      select a, b,
      row_number() over(partition by a order by b) rn
      from tb
    )
    , c as (
      select a, c,
      row_number() over(partition by a order by c) rn
      from tc
    )
    , d as (
      select a, d,
      row_number() over(partition by a order by d) rn
      from td
    )
    select a, b, c, d
    from ta left join b using(a)
    full join c using(a, rn)
    full join d using(a, rn)
    order by a, rn;
    
    select a, max(b) b, max(c) c, max(d) d
    from (
      select a, null b, null c, null d, 1 rn
      from ta
      union all
      select a, b, null, null,
      row_number() over(partition by a order by b) rn
      from tb
      union all
      select a, null, c, null,
      row_number() over(partition by a order by c) rn
      from tc
      union all
      select a, null, null, d,
      row_number() over(partition by a order by d) rn
      from td
    )
    group by a, rn
    order by a, rn;
    
    select A,B,C,D from (
      select 'A' tab, a, null val, 1 rn from ta
      union all
      select 'B' tab, a, b,
      row_number() over(partition by a order by b) rn
      from tb
      union all
      select 'C' tab, a, c,
      row_number() over(partition by a order by c) rn
      from tc
      union all
      select 'D' tab, a, d,
      row_number() over(partition by a order by d) rn
      from td
    )
    pivot(max(val) for tab in('B' B, 'C' C, 'D' D))
    order by a, rn;
    
    A B C D
    A B1 C1 D1
    A B2 C2 D2
    A C3 D3
    A C4
    B

    Personally, I would prefer to view the data by using a 'join the union', in order to avoid the impression that the different detail records are related somehow.

    select ta.a, b, c, d
    from tb full join tc on 1=0
    full join td on 1=0
    right join ta on ta.a in (tb.a, tc.a, td.a);
    
    A B C D
    A B1
    A B2
    A C1
    A C2
    A C3
    A C4
    A D1
    A D2
    A D3
    B
  • I can't create a table with SDO_GEOMETRY type of data in the database of 12 c

    Hello

    When I run the following script I get an error please help,

    Error from line: 3 in command.

    create table SPATIAL.warehouses)

    whse_code VARCHAR2 (4) primary key,.

    warehouse of VARCHAR2 (50).

    location SDO_GEOMETRY

    )

    Error report-

    SQL error: ORA-00902: invalid data type

    00902 00000 - "invalid data type".

    * Cause:

    * Action:

    I use a 12 c database.

    Hi guys

    I found the solution by asking my DBA to reinstall localization features using the oracle Installer.

    Now everything works fine.

    Thanks again for the responses.

  • Create table with data in the column

    Create a new table, just want to know if there is a way to add a new column to the table with a value in all areas of this column when new rows are added to that this column will always be the same value

    As...

    name | address | zip | assets



    Active will always be Yes.
    I do a trigger?

    Use the default...

    create table (test)
    name varchar2 (20).
    address varchar2 (40),
    zip number (7).
    Active VARCHAR2 (3) DEFAULT NULL NOT 'yes');

  • Creating tables with the same Structure and with the remote control FOR the parts database

    Hello

    I have a remote DB connection and a local DB connection in my system
    I want to create the same Table and data from my DB remote to Local Connection DB connection.

    Please tell me how to do this?

    CREATE TABLE LOCAL_TABLE AS SELECT * FROM REMOTE_TABLE@TNS_ALIAS;

  • Problem with iterator and EJB data control

    My project components:

    JDeveloper 12.1.3

    Back end & the intermediate layer, JPA, EJB 3, controls data EJB

    JSF pages simple front end (no fragment), bounded task flow

    Hello

    I have a weird problem with iterators in my project, project using EJB 3 & JPA and EJB data controls

    When the user come to a page (this page is part of a stubborn workflow) and add a record to a table (linked to an iterator) and without saving changes, leave the page (means output delimited task flow)

    do something else and again back to the first page iterator always keep this line is entry and it cause problems in my system

    If I close the browser and come to this page for sure the line is not there

    I expect when the user leaving a stubborn workflow each thing belongs to this workflow should be deleted. Is this true?

    Or someone has the same problem? Any suggestions / or work around?

    Respect of

    Mohsen

    Have you read the link I posted? Have you named the BA a transactional data control?

    When you leave the workflow you issue a rllback and the new line should have disappeared.

    Timo

  • Error creating table with clusters

    Hello
    I tried the following
    CREATE CLUSTER emp_dept (deptno NUMBER(3))
    Cluster is created

    Then I tried to create the table with the cluster above but giving error:
    create table emp10 (ename char(5),deptno number(2) )cluster emp_dept(deptno);
    The error is:
    ORA-01753 column definition incompatible with clustered column definition
    Could you please help me in this

    Your cluster is based on a NUMBER data type (3), while the emp10 table has a deptno column with a data type of NUMBER (2).

  • Unique table with several columns or several tables split?

    What is the best.

    A table with multiple columns inside or divided into several tables. Why?
    How will the performance in the two scenarios?

    Hello

    user13024762 wrote:
    I have a table EMP that has column EMP_ID, EMP_NAME MGR_ID, MGR_NAME, SALARY, EXP_IN_MNTHS, EXP_IN_YRS... etc with multiple columns

    I have the following tables
    EMP-> EMP_ID, EMP_NAME

    Each row in the table emp thie represents a separate employee. I guess other columns in the emp table might be birth_date, social_security_number and status (by example, 'Active', 'Leave', 'complete'). Here's what an employee has (at least) one of. If there is a one-to-many relationship between an employee and an attribute, then you probably want another table for this attribute.

    BISHOP-> EMP_ID, MGR_ID, MGR_NAME

    There is a one-to-many relationship between employees and managers? In other words, an employee may have 2 or more managers? If Yes, then you need another table.
    If there is only a one-to-one relationship between employees and managers (in other words, if an employee is never more than 1 Manager) so why don't you just have a mgr_id column in the emp table?
    Managers are also used for? (This is often the case, as in scott.emp and hr.employees.) If so, do not store their names in the EME and tables of mgr. Store name (and date of birth and other information) in the table emp only and, if you need a table of Bishop, just the emp_id and mgr_id column.

    SAL-> EMP_ID, SALARY

    There is a one-to-many relationship between the employees and wages? In other words, an employee may have 2 or more treatments? If so, how will you use the values? Is a special treatments in some way, as it will be used more often than others? (In other words, you may have a current and past wages salary, but the last wages are rarely used.)
    If you never have more than 1 salary for a given employee, why not just have a sal column in the emp table?

    EXP-> EMP_ID, EXP_IN_MNTHS, EXP_IN_YRS

    There is a one-to-many relationship between the employees and what whether you store in this table?

    etc. with more tables

    What is the best based on

    (1) performance and data recovery
    (2) ease of use
    (3) maintainability

    A one-to-many relationship requires an additional table. If an employee can have up to 3 managers, don't have mgr1, mgr2 and mgr3 columns in the emp table. Use a separate table, with up to 3 lines for the same employee, instead.
    For 1-1 relationships, it is usually best to not have separate tables.

  • Count on a table with header and row data in the query

    Hello

    I have an obligation to prepare a report that shows the metrics on the provider. I need to find the total PO for this provider, which fit the Bill

    report must be mealgne of #ofpo, #invoice, total_inv_amt and total_po_amt, total_tax_amt with numbers also with the point in time. So my question is how do we achieve this I have this below query that gives all the data but do not know how to get the counties with that. All ideas

    SELECT hou.name,
    POV. $VENDOR_NAME,
    API.invoice_num,
    API.invoice_id,
    invoice_date,
    gl_date,
    API.invoice_currency_code,
    APID.line_type_lookup_code inv_line_type,
    APID. Description inv_description,
    APID.amount,
    APID.unit_price inv_price,
    amount_paid,
    apt. Name payment_terms,
    payment_status_flag,
    APC.check_number,
    APC.check_date,
    Poh.Segment1 po_num,
    Poh.CREATION_DATE po_creation_date,
    por. CREATION_DATE po_rel_creation_date,
    por.release_num,
    pol.line_num,
    MC. Segment1 category_name,
    (select item_num msi.segment1
    MSI inv.mtl_system_items_b
    where msi.inventory_item_id = pol.item_id
    and msi.organization_id = 1) item_num.
    pol.item_description po_item_description,
    Poll.need_by_date,
    pol.unit_price po_price,
    Poll.Quantity,
    Poll.quantity_cancelled,
    Poll.quantity_received,
    Poll.quantity_billed
    OF api ap.ap_invoices_all,.
    Hou hr_operating_units,.
    apt, ap_terms_tl
    AP.ap_invoice_distributions_all apid,
    pod po.po_distributions_all,
    Po.po_vendors pov,
    Po.po_headers_all poh,
    Po.po_lines_all pol,
    survey of po.po_line_locations_all,
    por po.po_releases_all,
    AP.ap_checks_all apc,
    AP.ap_invoice_payments_all IPA,
    -inv.mtl_system_items_b msi,
    Apps.mtl_categories_b mc
    WHERE apt.term_id = api.terms_id
    AND hou.organization_id = api.org_id
    AND BETWEEN TRUNC (poh.creation_date): p_start_date AND: p_end_date
    AND api.invoice_id = apid.invoice_id
    AND apid.po_distribution_id = pod.po_distribution_id (+)
    AND pov.vendor_id = api.vendor_id
    AND poh.po_header_id (+) = pod.po_header_id
    AND poll.line_location_id (+) = pod.line_location_id
    AND pol.po_line_id (+) = pod.po_line_id
    AND apip.check_id = apc.check_id (+)
    AND apip.invoice_id (+) = api.invoice_id
    AND mc.category_id (+) = pol.category_id
    AND por.po_release_id (+) = pod.po_release_id
    AND pov.vendor_id = 1

    Hello

    Her looks like a job for the COUNT function. That's all I can say with certainty based on the information you gave.

    If you want to see on each line of output, the number of rows with the same value of api.invoice_num has a value for poh.po_header_id, you can use

    COUNT (poh.po_header_id) OVER (PARTITION BY api.invoice_num)   AS po_cnt
    

    I could give much better directions if you could post a small example of data (CREATE TABLE and INSERT statements) and the results desired from these data. I realize it's hard with so many pictures. To see some of your courses and the desired output, could help.

  • DLL in VC ++ with several types of data

    Hello world

    I'm new on the Forum of Labview and Labview fairly new as well.

    I have some errors in my VI and I can't quite understand what I'm doing wrong. I have a DLL written in VC ++. There is a function in the DLL that I'm shouting in VI, but the function contains variables that are composed of multiple data types.

    These are my variables in the code for VC ++:

    typedef struct
    {
    Double depth;
    Double dWidth;
    Double dHeight;

    float fVolume;
    float fSurfArea;

    int iGood;
    int iBad;
    } box_t

    Then I have my function that calls these variables:

    _declspec (dllexport) int _cdecl ACL_GetData_Array(void *dataArray)
    {
    arrayStructure-> rockia = (array_t *) dataArray.
    PrintGeneral ("table pointer value to retrieve data. ("\n new address.");
    PrintAddr ((int) arrayStructure-> rockia);
    arrayStructure-> Philippe-> depth = 30.3;
    arrayStructure-> Philippe-> dHeight = 40.4;
    arrayStructure-> Philippe-> dWidth = 50.5;
    arrayStructure-> Philippe-> fSurfArea = 60.6f;
    arrayStructure-> Philippe-> fVolume = 70.7f;
    arrayStructure-> Philippe-> iBad = 80;
    arrayStructure-> Philippe-> iGood = 90;
     
    Return (int) arrayStructure-> Philippe;
    }

    Now my question is if I just want to read these variables and display them in Labview, how can I do? So far, I can get double appears correctly, but I did have a success with floats and integers (ints). If this has been posted by another user, I'm sorry to ask the same question. I searched for a few days now and have not encountered any useful information.

    Thank you

    George

    ghatz85 wrote:

    If possible, can you save the VI changed in version 8.5.1? LabVIEW won't let me open the files attached to the forum.

    I'm sorry. For some reason, I thought that the originals were in 2009 LV. Version 8.5 is attached.

    Insofar as the structure of data in the DLL, the programmer had rearranged the types of data to go from the largest to the smallest.

    I was talking of having a structure within a structure and call it a "table".

Maybe you are looking for