Retrieve data from different record

I want to display a characteristic from a previous record, from the same cube, but display it in the current record row.
i.e. get the most recent activity of type"XX" and display the result characteristic from that record on the most recent "YY" activity record.
Hope this makes sense.
Is the only way to do this in a Virtual Key figure?
Thanks

Solved problem, posting this incase others have problem
I solved this problem by using an Infoset. To get the most recent record I used the TOP N (1) in a condition on a RKF.

Similar Messages

  • Retrieving data from different tables in the same time crash

    Hi
    this is probably the wrong way to do it, but this is how I did:
    - I wanted a screen with 3 datagrids components retrieving data from 3 different tables.
    - I could make it work while enabling 1 or 2 of them.  When the 3 are enabled, I get this error:
    btw its a huge msg, I will trim it:
    ArgumentError: Can't find ManagedQuery or ManagedOperation named: getItems_paged     at mx.data::RPCDataServiceAdapter/executeQuery()[C:\depot\DataServices\branches\lcds_modeler 101\frameworks\projects\data\src\mx\data\RPCDataServiceAdapter.as:325]     at mx.data::RPCDataServiceAdapter/processDataMessage()[C:\depot\DataServices\branches\lcds_m odeler101\frameworks\projects\data\src\mx\data\RPCDataServiceAdapter.as:920]     at RPCDataServiceRequest/invoke()[C:\depot\DataServices\branches\lcds_modeler101\frameworks\ projects\data\src\mx\data\RPCDataServiceAdapter.as:1668]     at mx.data::DataStore/http://www.adobe.com/2006/flex/mx/internal::invoke()[C:\depot\DataServices\branches\lcds_m odeler101\frameworks\projects\data\src\mx\data\DataStore.as:3343] ...  it continues forever. 
    the getItems_paged is a auto generated function inside the php class flex generates to handle the tables.
    Each of the datagrid is a custom component. I made so to avoid keeping a bunch of code lines in the main 'page'.
    Any suggestion to make it work smoothly?
    Thanks in advance,
    btp~

    Hi
    this is probably the wrong way to do it, but this is how I did:
    - I wanted a screen with 3 datagrids components retrieving data from 3 different tables.
    - I could make it work while enabling 1 or 2 of them.  When the 3 are enabled, I get this error:
    btw its a huge msg, I will trim it:
    ArgumentError: Can't find ManagedQuery or ManagedOperation named: getItems_paged     at mx.data::RPCDataServiceAdapter/executeQuery()[C:\depot\DataServices\branches\lcds_modeler 101\frameworks\projects\data\src\mx\data\RPCDataServiceAdapter.as:325]     at mx.data::RPCDataServiceAdapter/processDataMessage()[C:\depot\DataServices\branches\lcds_m odeler101\frameworks\projects\data\src\mx\data\RPCDataServiceAdapter.as:920]     at RPCDataServiceRequest/invoke()[C:\depot\DataServices\branches\lcds_modeler101\frameworks\ projects\data\src\mx\data\RPCDataServiceAdapter.as:1668]     at mx.data::DataStore/http://www.adobe.com/2006/flex/mx/internal::invoke()[C:\depot\DataServices\branches\lcds_m odeler101\frameworks\projects\data\src\mx\data\DataStore.as:3343] ...  it continues forever. 
    the getItems_paged is a auto generated function inside the php class flex generates to handle the tables.
    Each of the datagrid is a custom component. I made so to avoid keeping a bunch of code lines in the main 'page'.
    Any suggestion to make it work smoothly?
    Thanks in advance,
    btp~

  • Retrieve data from different database

    Hi all,
    I have 2 database servers, servar a and server b, i created a form from server a table, in the same form i have a LOV, i want to see data in this LOV from server b table.
    how i can do it ?
    thanks
    Noman

    Thanks for your early reply,
    Can you please more elaborate how I retrieve data from server b in LOV after creating a link with server b.
    What I did exactly I made a data base string in server a from server b, still I am confuse how I retrieve my data from that server database..
    Noman

  • Retrieving data from different node in SQL

    Hi friends,
    First of all:
            BANNER
    1     Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    2     PL/SQL Release 11.2.0.3.0 - Production
    3     CORE     11.2.0.3.0     Production
    4     TNS for Linux: Version 11.2.0.3.0 - Production
    5     NLSRTL Version 11.2.0.3.0 - ProductionI have a small but annoying problem. I have to build a bank application which must take data from an input file, and, based on those information, to execute some stored procedures (create a new customer, create a new account, create a transaction for an account).
    For example: the input file contain few new customers (FirstName, LastName, SocialSecurityNumber, BirthDay, Address and PhoneNo), for each customer at least 1 account to be created, for each account 1 or more transactions (the amount of transaction).
    Let me be more specific. This is an XML as a input file:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <doc>
      <PERS_INFO>
        <lastname>John</lastname>
        <firstname>Doe</firstname>
        <social_security_no>1800325171545</social_security_no>
        <birthday>25/03/1980</birthday>
        <address>Principal, 15</address>
        <phoneno>0040722222222</phoneno>
        <acc>
          <transaction>200</transaction>
          <transaction>150</transaction>
          <transaction>-23</transaction>
        </acc>
        <acc>
          <transaction>450</transaction>
        </acc>
        <acc>
          <transaction>800</transaction>
          <transaction>320</transaction>
          <transaction>-125</transaction>
        </acc>
      </PERS_INFO>
      <PERS_INFO>
        <lastname>Smith</lastname>
        <firstname>Pop</firstname>
        <social_security_no>2851211173377</social_security_no>
        <birthday>11/12/1985</birthday>
        <address>FirstAvenue, 20</address>
        <phoneno>0040744444444</phoneno>
        <acc>
          <transaction>444</transaction>
          <transaction>550</transaction>
        </acc>
        <acc>
          <transaction>113</transaction>
          <transaction>-50</transaction>
          <transaction>89</transaction>
        </acc>
        <acc>
          <transaction>300</transaction>
        </acc>
      </PERS_INFO>
    </doc>This input file should start the following:
    - create 2 new customers (using a stored procedure Pr_Add_New_Cust):
    1. John Doe / 1800325171545 / 25.03.1980 / Principal, 15 / 0040722222222
    2. Smith Pop / 2851211173377 / 11.12.1985 / FirstAvenue, 20 / 0040744444444
    - for John Doe I have to create 3 new account (using a stored procedure Pr_Add_New_Account):
    - account 1 - for this account I have to create 3 new transactions (using a stored procedure Pr_Create_New_Trans): DEPOSIT 200$, DEPOSIT 150$, WITHDRAW 23$
    - account 2 - for this account I have to create 1 new transactions (using a stored procedure Pr_Create_New_Trans): DEPOSIT 450$
    - account 3 - for this account I have to create 3 new transactions (using a stored procedure Pr_Create_New_Trans): DEPOSIT 800$, DEPOSIT 320$, WITHDRAW 125$
    - for Smith Pop I have to create 3 new account (using a stored procedure Pr_Add_New_Account):
    - account 1 - for this account I have to create 2 new transactions (using a stored procedure Pr_Create_New_Trans): DEPOSIT 444$, DEPOSIT 550$
    - account 2 - for this account I have to create 3 new transactions (using a stored procedure Pr_Create_New_Trans): DEPOSIT 113$, WITHDRAW 50$, DEPOSIT 89$
    - account 3 - for this account I have to create 1 new transactions (using a stored procedure Pr_Create_New_Trans): DEPOSIT 300$
    Well, I'm thinking to do that by loading that XML into a pre-staging table - INS_STG1 - (the loading part is not an issue for the moment) and by parsing the XML in order to get my necessary information (inserting into the second staging table INS_STG2) to launch those procedures.
    Something like this (for the moment I insert only the customer information since I don't know how to get to the second level):
    DECLARE 
       TYPE ty_rec_1    IS RECORD (v_cust_firstname       VARCHAR2(32),
                                   v_cust_lastname        VARCHAR2(32),
                                   v_cust_persnumcode     VARCHAR2(32),
                                   v_cust_birthday        VARCHAR2(32),
                                   v_cust_address         VARCHAR2(32),
                                   v_cust_phoneno         VARCHAR2(32));
       TYPE ty_cur_1       IS REF CURSOR RETURN ty_rec_1;
       TYPE ty_arr_rec_1   IS TABLE OF ty_rec_1 INDEX BY PLS_INTEGER;
       cur_1               ty_cur_1;
       arr_rec_1           ty_arr_rec_1;
       my_xml              xmltype;
       N_BULK_SIZE         NUMBER := 1000;
    BEGIN
      SELECT xml_column INTO my_xml FROM INS_STG1;
      OPEN cur_1 FOR
        SELECT extractvalue(column_value, '/PERS_INFO/firstname')          "v_cust_firstname",
               extractvalue(column_value, '/PERS_INFO/lastname')           "v_cust_lastname",
               extractvalue(column_value, '/PERS_INFO/social_security_no') "v_cust_persnumcode",
               extractvalue(column_value, '/PERS_INFO/birthday')           "v_cust_birthday",
               extractvalue(column_value, '/PERS_INFO/address')            "v_cust_address",
               extractvalue(column_value, '/PERS_INFO/phoneno')            "v_cust_phoneno"      
        FROM TABLE(XMLSequence(my_xml.extract('/doc/PERS_INFO'))) t;
        LOOP
           FETCH cur_1 BULK COLLECT INTO arr_rec_1 LIMIT N_BULK_SIZE;
           EXIT WHEN arr_rec_1.COUNT() = 0;
           FORALL n_idx1 IN 1..arr_rec_1.COUNT()
             INSERT INTO INS_STG2
               (cust_firstname, cust_lastname, cust_persnumcode, cust_birthday, cust_address, cust_phoneno)
              VALUES
              (arr_rec_1(n_idx1).v_cust_firstname, arr_rec_1(n_idx1).v_cust_lastname,
               arr_rec_1(n_idx1).v_cust_persnumcode, arr_rec_1(n_idx1).v_cust_birthday,
               arr_rec_1(n_idx1).v_cust_address, arr_rec_1(n_idx1).v_cust_phoneno);
         END LOOP;
       CLOSE cur_1; 
      COMMIT;             
    END;That procedure is based on the SQL query that I start to ply with in order to understand how to get the information from XML using SQL (the XML is hard-coded)
    SELECT extractvalue(column_value, '/PERS_INFO/firstname')    "First Name",
           extractvalue(column_value, '/PERS_INFO/lastname')     "Last Name",
           extractvalue(column_value, '/PERS_INFO/social_security_no')  "Social Security No",
           extractvalue(column_value, '/PERS_INFO/birthday')     "Birth-day",
           extractvalue(column_value, '/PERS_INFO/address')      "Address",
           extractvalue(column_value, '/PERS_INFO/phoneno')      "Phone No"
      FROM TABLE(XMLSequence(
                 XMLTYPE(
                 '<?xml version="1.0" encoding="ISO-8859-1"?>
                  <doc>
                    <PERS_INFO>
                      <lastname>John</lastname>
                      <firstname>Doe</firstname>
                      <social_security_no>1800325171545</social_security_no>
                      <birthday>25/03/1980</birthday>
                      <address>Principal, 15</address>
                      <phoneno>0040722222222</phoneno>
                      <acc>
                        <transaction>200</transaction>
                        <transaction>150</transaction>
                        <transaction>-23</transaction>
                      </acc>
                      <acc>
                        <transaction>450</transaction>
                      </acc>
                      <acc>
                        <transaction>800</transaction>
                        <transaction>320</transaction>
                        <transaction>-125</transaction>
                      </acc>
                    </PERS_INFO>
                    <PERS_INFO>
                      <lastname>Smith</lastname>
                      <firstname>Pop</firstname>
                      <social_security_no>2851211173377</social_security_no>
                      <birthday>11/12/1985</birthday>
                      <address>FirstAvenue, 20</address>
                      <phoneno>0040744444444</phoneno>
                      <acc>
                        <transaction>444</transaction>
                        <transaction>550</transaction>
                      </acc>
                      <acc>
                        <transaction>113</transaction>
                        <transaction>-50</transaction>
                        <transaction>89</transaction>
                      </acc>
                      <acc>
                        <transaction>300</transaction>
                      </acc>
                    </PERS_INFO>
                  </doc>').extract('/doc/PERS_INFO'))) t;My problem is that query goes only at the first level (the customer level). I don't know how to get to the second/third level (account/transactions level).
    Now, that query return:
    Doe     John     1800325171545     25/03/1980     Principal, 15     0040722222222
    Pop     Smith     2851211173377     11/12/1985     FirstAvenue, 20     0040744444444and I want it to return like this:
    Doe     John     1800325171545     25/03/1980     Principal, 15     0040722222222  1   200
    Doe     John     1800325171545     25/03/1980     Principal, 15     0040722222222  1   150
    Doe     John     1800325171545     25/03/1980     Principal, 15     0040722222222  1  -23
    Doe     John     1800325171545     25/03/1980     Principal, 15     0040722222222  2   450
    Doe     John     1800325171545     25/03/1980     Principal, 15     0040722222222  3   800
    Doe     John     1800325171545     25/03/1980     Principal, 15     0040722222222  3   320
    Doe     John     1800325171545     25/03/1980     Principal, 15     0040722222222  3  -125
    Pop     Smith     2851211173377     11/12/1985     FirstAvenue, 20     0040744444444  1   444
    Pop     Smith     2851211173377     11/12/1985     FirstAvenue, 20     0040744444444  1   550
    Pop     Smith     2851211173377     11/12/1985     FirstAvenue, 20     0040744444444  2   113
    Pop     Smith     2851211173377     11/12/1985     FirstAvenue, 20     0040744444444  2  -50
    Pop     Smith     2851211173377     11/12/1985     FirstAvenue, 20     0040744444444  2   89
    Pop     Smith     2851211173377     11/12/1985     FirstAvenue, 20     0040744444444  3   300What I have to do to that SQL query to get the result at the transaction level (as in the second table)? That XML can be subject of improvement as well. If another structure serve better for my purpose, please let me know.
    Thanks!

    As [url http://docs.oracle.com/cd/E11882_01/server.112/e26088/functions061.htm#SQLRF06173]extractvalue is deprecated in your version, you need to switch to another method as the documentation suggests.
    Going forward with that, here is a starter SQL that gives you the desired output
    WITH INS_STG1 AS
    (SELECT XMLTYPE('<?xml version="1.0" encoding="ISO-8859-1"?>
                  <doc>
                    <PERS_INFO>
                      <lastname>John</lastname>
                      <firstname>Doe</firstname>
                      <social_security_no>1800325171545</social_security_no>
                      <birthday>25/03/1980</birthday>
                      <address>Principal, 15</address>
                      <phoneno>0040722222222</phoneno>
                      <acc>
                        <transaction>200</transaction>
                        <transaction>150</transaction>
                        <transaction>-23</transaction>
                      </acc>
                      <acc>
                        <transaction>450</transaction>
                      </acc>
                      <acc>
                        <transaction>800</transaction>
                        <transaction>320</transaction>
                        <transaction>-125</transaction>
                      </acc>
                    </PERS_INFO>
                    <PERS_INFO>
                      <lastname>Smith</lastname>
                      <firstname>Pop</firstname>
                      <social_security_no>2851211173377</social_security_no>
                      <birthday>11/12/1985</birthday>
                      <address>FirstAvenue, 20</address>
                      <phoneno>0040744444444</phoneno>
                      <acc>
                        <transaction>444</transaction>
                        <transaction>550</transaction>
                      </acc>
                      <acc>
                        <transaction>113</transaction>
                        <transaction>-50</transaction>
                        <transaction>89</transaction>
                      </acc>
                      <acc>
                        <transaction>300</transaction>
                      </acc>
                    </PERS_INFO>
                  </doc>') xml_column FROM DUAL
    -- The above simulates your table.  Only the below matters.
    SELECT xt.First_Name, xt.birth_day, xt2.acc_rn, xt3.trans
      FROM INS_STG1,
           XMLTable('/doc/PERS_INFO'
                    PASSING INS_STG1.xml_column
                    COLUMNS
                    First_Name   VARCHAR2(20) PATH 'firstname',
                    Birth_day    VARCHAR2(10) PATH 'birthday',
                    acc_xml      XMLType      PATH 'acc') xt,
           XMLTable('/acc'
                    PASSING xt.acc_xml
                    COLUMNS
                    acc_rn       FOR ORDINALITY,
                    tran_xml     XMLTYPE      PATH 'transaction') xt2,
           XMLTable('/transaction'
                    PASSING xt2.tran_xml
                    COLUMNS
                    trans        NUMBER       PATH '.') xt3;producesFIRST_NAME           BIRTH_DAY      ACC_RN      TRANS
    Doe                  25/03/1980          1        200
    Doe                  25/03/1980          1        150
    Doe                  25/03/1980          1        -23
    Doe                  25/03/1980          2        450
    Doe                  25/03/1980          3        800
    Doe                  25/03/1980          3        320
    Doe                  25/03/1980          3       -125
    Pop                  11/12/1985          1        444
    Pop                  11/12/1985          1        550
    Pop                  11/12/1985          2        113
    Pop                  11/12/1985          2        -50
    Pop                  11/12/1985          2         89
    Pop                  11/12/1985          3        300Now ... there is probably a better XQuery way to pull that off, but I'll save that example for someone better at XQuery than myself.
    I will also include that it is possible all this work could be done in a single SQL statement as shown by
    [url http://odieweblog.wordpress.com/2012/05/10/how-to-load-xml-data-into-multiple-tables/]How To : Load XML data into multiple tables

  • Retrieving Data from different Tables with same tuple name

    Hi,
    I am made the following query from different tables. A tuple "name" is appearing in some tables. So when I run the qiery in a Java class, it delivers the same result of c.name, bpl.name and p.name. The result of c.name is correct, but the other 2 names are overwritten. It works perfect in a postgreSql query tool. How can I correct it, plz?
    SELECT c.ad_client_id, c.name, o.c_order_id, o.ref_order_id, bp.name, bpl.name, o.dateordered, o.datepromised, od.c_orderline_id,p.m_product_id,p.name, cur.iso_code, od.qtyordered
    FROM adempiere.ad_client c, adempiere.c_order o, adempiere.c_orderline od, adempiere.c_bpartner bp, adempiere.m_product p, adempiere.c_bpartner_location bpl, adempiere.c_currency cur
    WHERE c.ad_client_id =11 and c.ad_client_id = o.ad_client_id and bp.c_bpartner_id=o.c_bpartner_id and o.c_order_id = od.c_order_id and od.m_product_id = p.m_product_id and o.c_bpartner_location_id =bpl.c_bpartner_location_id and o.c_currency_id=cur.c_currency_id;
    Cheers

    Hi,
    create alias, if u have similar field names as below. Use the alias name (rs.getString("cname") and rs.getString("bpname") and so on ) to retrive data.
    SELECT c.ad_client_id, c.name as cname, o.c_order_id, o.ref_order_id, bp.name as bpname, bpl.name as bplname, o.dateordered, o.datepromised, od.c_orderline_id,p.m_product_id,p.name as pname, cur.iso_code, od.qtyordered
    FROM adempiere.ad_client c, adempiere.c_order o, adempiere.c_orderline od, adempiere.c_bpartner bp, adempiere.m_product p, adempiere.c_bpartner_location bpl, adempiere.c_currency cur
    WHERE c.ad_client_id =11 and c.ad_client_id = o.ad_client_id and bp.c_bpartner_id=o.c_bpartner_id and o.c_order_id = od.c_order_id and od.m_product_id = p.m_product_id and o.c_bpartner_location_id =bpl.c_bpartner_location_id and o.c_currency_id=cur.c_currency_id;Regards,
    Ram

  • To retrieve the Maximum Date from the record

    Hi All,
    I am using the bleow query to retrieve the max date from the record list:
    select w.wr_no,w.customer_id,w.place_id, w.entry_Date, max(app.appointment_date) as appointment_date
    from work_request w , wr_appointment app
    where w.wr_no=app.wr_no
    and w.customer_id = '020167001'
    and w.place_id = '1151667'
    group by w.wr_no, w.customer_id,w.place_id, w.entry_Date;
    However i am getting the as many as three rows even after using the max function. The max date comes as the last record out the three rows retrieved.
    Thanks,
    Mark

    Mark Andrew wrote:
    And for Sven for the above customer id and place id, i receive the below result:
    WR_NO CUSTOMER_ID PLACE_ID ENTRY_DATE APPOINTMENT_DATE
    1306782233 020167001 1151667 26/07/2010 29/07/2010
    1387090103 020167001 1151667 26/02/2010 16/03/2010
    1393896673 020167001 1151667 23/01/2011 25/01/2011
    After using the rank function i will be receiving:
    WR_NO CUSTOMER_ID PLACE_ID ENTRY_DATE APPOINTMENT_DATE RK
    1393896673 020167001 1151667 23/01/2011 25/01/2011 1Now I get it.
    In fact you want to group only on the customer (and place_id?) and get all the information from the line with the last appointment date.
    Analytic functions such as RANK or ROW_NUMBER are good for this.
    The select can look like this.
    select * from (
       select w.wr_no,w.customer_id,w.place_id, w.entry_Date, app.appointment_date,
             row_number() over (partition by w.customer_id, w.place_id order by  app.appointment_date desc,  w.wr_no desc) rn
       from work_request w , wr_appointment app
      where w.wr_no=app.wr_no
      --and w.customer_id = '020167001'
      --and w.place_id = '1151667'
    where rn = 1
    ;In fact I think you can do the same operation in EXCEL directly.
    FIrst you need to sort the data by customer (asc), place (asc) and appointment date (desc).
    Then add a column in excel that give you the line where you have a new customer id.
    Assuming this new column is column H and the customerid is in column A then the function in Cell H2 would look like this.
    A function like ("=A2=A1"). Copy this formular to all the other H cells.
    Then add a auto filter on it and only select all the rows where the result is FALSE.
    Same logic as in SQL, but done in Excel.

  • What are the different ways of retrieving data from Oracle8i

    What are the different ways of retrieving data from Oracle8i
    into my HTML page ?
    Is it JDBC and ODBC ?
    Is there any other way ?
    null

    Methods I tried,
    Applet using SQLJ/JDBC with JDBC drivers thin or Oci8,
    Oracle Web Publishing Assistant,
    HTP/HTF PL/SQL packages (if you have OAS 4.0)
    Webserver Generator of Designer 2000 (if you have OAS 4.0)
    Arun (guest) wrote:
    : What are the different ways of retrieving data from Oracle8i
    : into my HTML page ?
    : Is it JDBC and ODBC ?
    : Is there any other way ?
    null

  • Problems with retrieving data from tables with 240 and more records

    Hi,
    I've been connecting to Oracle 11g Server (not sure exact version) using Oracle 10.1.0 Client and O10 Oracle 10g driver. Everything was ok.
    I installed Oracle 11.2.0 Client and I started to have problems with retrieving data from tables.
    First I used the same connection string, driver and so on (O10 Oracle 10g) then I tried ORA Oracle but with no luck. The result is like this:
    I'm able to connect to database. I'm able to retrieve data but from small tables (e.g. with 110 records it works perfectly using both O10 and ORA drivers). When I try to retrieve data from tables with like 240 and more records retrieval simply hangs (nothing happens at all - no error, no timeout). Application seems to hang forever.
    I'm using Powerbuilder to connect to Database (either PB10.5 using O10 driver or PB12 using ORA driver). I used DBTrace, so I see that query hangs on the first FETCH.
    So for the retrievals that hang I have something like:
    (3260008): BIND SELECT OUTPUT BUFFER (DataWindow):(DBI_SELBIND) (0.186 MS / 18978.709 MS)
    (3260008): ,len=160,type=DECIMAL,pbt=4,dbt=0,ct=0,prec=0,scale=0
    (3260008): ,len=160,type=DECIMAL,pbt=4,dbt=0,ct=0,prec=0,scale=1
    (3260008): ,len=160,type=DECIMAL,pbt=4,dbt=0,ct=0,prec=0,scale=0
    (3260008): EXECUTE:(DBI_DW_EXECUTE) (192.982 MS / 19171.691 MS)
    (3260008): FETCH NEXT:(DBI_FETCHNEXT)
    and this is the last line,
    while for retrievals that end, I have FETCH producing time, data in buffer and moving to the next Fetch until all data is retrieved
    On the side note, I have no problems with retrieving data either by SQL Developer or DbVisualizer.
    Problems started when I installed 11.2.0 Client. Even if I want to use 10.0.1 Client, the same problem occurs. So I guess something from 11.2.0 overrides 10.0.1 settings.
    I will appreciate any comments/hints/help.
    Thank you very much.

    pgoel wrote:
    I've been connecting to Oracle 11g Server (not sure exact version) using Oracle 10.1.0 Client and O10 Oracle 10g driver. Everything was ok.Earlier (before installing new stuff) did you ever try retrieving data from big tables (like 240 and more records), if yes, was it working?Yes, with Oracle 10g client (before installing 11g) I was able to retrieve any data, either it was 10k+ records or 100 records. Installing 11g client changed something that even using old 10g client (which I still have installed) fails to work. The same problem occur no matter I'm using 10g or 11g client now. Powerbuilder hangs on retrieving tables with more than like 240 records.
    Thanks.

  • Retrieve data from 2 columns of 2 different tables and display in 1 column

    Hi,
    Is it possible to retrieve data from 2 different columns of 2 different tables and display it in the same column of a datablock in a form.
    For example:
    Table A
    Col1
    1
    2
    3
    Table B
    Col1
    2
    4
    5
    The column from the datablock in the form should display the following:
    1
    2
    3
    2
    4
    5

    You can create a view
    select ... from table_a
    union
    select ... from table_b
    and base the block on that.
    However, if you want to allow DML on the block it gets more complicated.

  • InfoCube Modelling-Adding data from different ODS's on to the Infocube

    Hi Experts,
    I am new to SAP BI. I have a basic doubt on Modelling the InfoCube.
    In our requirement, I have to populate data from 9 custom SAP Tables on to 9 ODS's. And, then take these data on to Infocubes.
    And, they want to reduce the number of cubes as much as possible. So, I have to combine the data from different ODS's and build 2-3 Infocubes.
    For Example.
    I am going to combine 5 ODS's data on to 1 CUBE based on Delivery number...
    there are 5 ODS with common key Delivery number. And, suppose I have added some set of fields from ODS1.
    And, now when I add other set of fields from the second ODS, WHAT WILL HAPPEN TO THE 'Delivery Number' field ??
    I will make it clear.
    I have a record in CUBE already containing Fields- : Delivery no, field_a,  field_b, field_c, field_d. Where the 'Delivery no =112333'. This record comes from ODS1.
    Now, I want to add data data from ODS2, containg fields -: Delivery no, field_e, field_f, field_g, field_h.
    And, what happens to the already existing record in CUBE with 'Delivery no = 11233'. ?
    Will the value in this info-object get overwritten ?
    OR.. will it combine the data from both the ODS's and show it as ONE record ???
    Please advice ... How will I solve this scenario ?
    Thanking You in Advance
    Shyne Sasimohanan

    Answer for your question and the suggestion.
    the data will look like as given below
    Delivery no, field_a, field_b, field_c, field_d, field_e, field_f, field_g, field_h
    11233           1           1           1          1            0           0            0            0
    11233          0           0          0             0           1           1           1          1 
    but the best way, according the design standards is creating another DSO on the top of all the DSO's and combine all the data in that DSO and send the data to Infocube. then the data will be shown as below.
    Delivery no, field_a, field_b, field_c, field_d, field_e, field_f, field_g, field_h
    11233           1           1           1          1            1           1           1          1 
    Regards,
    Siva A

  • Retrieve data from a dynamic page via loadURL

    Hello.
    I would like to ask you how it is possible to retrieve data
    from a dynamic page (asp classic in my case) using the loadURL
    method.
    I would like to create an html authentication form (with
    username and password fields). The loadURL method should call an
    asp page and then pass to the usual function 'DoIfSucceded' the
    results of the elaboration.
    Of course I'm going to have a switch in the function in order
    to make different actions depending from the results of the asp
    page (authentication succeded or failed).
    I had a look to the examples at this page:
    Adobe
    samples
    Is there anyone who can explain clearly how the results data
    must be written by the asp page and how the success function can
    retrieve them ?
    I thank you in advance for your help.

    loadURL() uses the the XMLHttpRequest Object so if the
    content you return is XML, you have 2 choices for accessing your
    data. You can either access it as a text string via the
    XMLHttpRequest object's responseText property, or as a DOM document
    via the XMLHttpRequest object's responseXML property:
    function MySuccessCallback(req)
    // If my data is XML, I can access the data that was sent
    from the server
    // as DOM elements via the XMLHttpRequest's responseXML
    property.
    var xmlDOM = req.xhRequest.responseXML;
    // OR, you can access the data sent back from the server as
    text via
    // the XMLHttpRequest object's responseText property.
    var xmlAsAString = req.xhRequest.responseText;
    var req = Spry.Utils.loadURL("GET",
    "/app/book.php?id=1&code=54321", true, MySuccessCallback);
    If your serverside script wants to use some other format as a
    response like JSON or plain text, then you can only access the data
    as text via the responseText property.
    --== Kin ==--

  • Retrieve data from a large table from ORACLE 10g

    I am working with a Microsoft Visual Studio Project that requires to retrieve data from a large table from Oracle 10g database and export the data into the hard drive.
    The problem here is that I am not able to connect to the database directly because of license issue but I can use a third party API to retrieve data from the database. This API has sufficient previllege/license permission on to the database to perform retrieval of data. So, I am not able to use DTS/SSIS or other tool to import data from the database directly connecting to it.
    Here my approach is...first retrieve the data using the API into a .net DataTable and then dump the records from it into the hard drive in a specific format (might be in Excel file/ another SQL server database).
    When I try to retrieve the data from a large table having over 13 lacs records (3-4 GB) in a data table using the visual studio project, I get an Out of memory exception.
    But is there any better way to retrieve the records chunk by chunk and do the export without loosing the state of the data in the table?
    Any help on this problem will be highly appriciated.
    Thanks in advance...
    -Jahedur Rahman
    Edited by: Jahedur on May 16, 2010 11:42 PM

    Girish...Thanks for your reply...But I am sorry for the confusions. Let me explain that...
    1."export the data into another media into the hard drive."
    What does it mean by this line i.e. another media into hard drive???
    ANS: Sorry...I just want to write the data in a file or in a table in SQL server database.
    2."I am not able to connect to the database directly because of license issue"
    huh?? I never heard this question that a user is not able to connect the db because of license. What error / message you are getting?
    ANS: My company uses a 3rd party application that uses ORACLE 10g. And my compnay is licensed to use the 3rd party application (APP+Database is a package) and did not purchased ORACLE license to use directly. So I will not connect to the database directly.
    3.I am not sure which API is you are talking about, but i am running an application of the visual studio data grid or similar kind of controls; in which i can select (select query) as many rows as i needed; no issue.
    ANS: This API is provided by the 3rd party application vendor. I can pass a query to it and it returns a datatable.
    4."better way to retrieve the records chunk by chunk and do the export without loosing the state of the data in the table?"
    ANS: As I get a system error (out of memory) when I select all rows in a datatable at a time, I wanted to retrieve the data in multiple phases.
    E.g: 1 to 20,000 records in 1st phase
    20,001 to 40,000 records in 2nd phase
    40,001 to ...... records in 3nd phase
    and so on...
    Please let me know if this does not clarify your confusions... :)
    Thanks...
    -Jahedur Rahman
    Edited by: user13114507 on May 12, 2010 11:28 PM

  • Unable to retrieve data from a Associative Array (?)

    Hi!!!! :)))
    i've a problem!!!
    this is the oracle's code:
    Package GEST_REPORT
    IS
    type rec_url is record(
    TIBCDCON TBISD_30.TIBCDCON%TYPE,
    etc...
    SETDEL VARCHAR2(10)
    type tab2 is table of rec_url index by binary_integer;
    FUNCTION MAIN_SELECT
    ( CPLAS IN VARCHAR2)
    RETURN tab2;
    END;
    ...and a java code:
    String storedProcedure = "{? = call GEST_REPORT.MAIN_SELECT(?)}";
    String result = "";
    try{
    if (connection != null) {
    CallableStatement callableStatement = null;
    callableStatement = preprepareCall(storedProcedure);
    // preparo parametri di input.
    callableStatement.setString(2, "OM");
    callableStatement.registerOutParameter(1, oracle.jdbc.driver.OracleTypes.ARRAY, "tab2");
    and so on...
    In the last line of code throws an 'invalid name pattern'
    or
    "ORA-21700: object does not exist or is marked for delete"
    if registerOutParameter(1, oracle.jdbc.driver.OracleTypes.ARRAY, "ISDSV.GEST_REPORT").
    Where TAB2: IS THE MY ARRAY (OR NESTED TABLE?);
    GEST_REPORT: THE NAME OF PACKAGE;
    ISDSV: THE USER.
    do u have suggestion for retrieve data from TAB2 in JAVA??
    THKS!!!!!!

    Hi
    Use fully qualified type name: schema_name.type_name. For your case that would be "ISDSV.tab2"
    Cherrs :))

  • How to retrieve data from a read-only Excel file

    Hi Developers,
    I'm trying to retrieve data from a read-only Excel file. I used the same code that I used to retrieve data from a normal Excel file, but it can't work.
    My code is as followed:
    try
    InputStream KpExcel = new FileInputStream("kp.xls");
    HSSFWorkbook Kpwb = new HSSFWorkbook(KpExcel);
    HSSFSheet Kpsheet = Kpwb.getSheetAt(0);
    catch(Exception e)
    e.printStackTrace();
    System.out.println("Exception: "+e.getMessage());
    The error I received is as followed:
    java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
    at org.apache.poi.hssf.record.RecordFactory.createRecord(RecordFactory.java:224)
    at org.apache.poi.hssf.record.RecordFactory.createRecords(RecordFactory.java:160)
    at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:163)
    at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:210)
    at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:191)
    at photoproductionsystem.IncomingWIPPanel.getKp(IncomingWIPPanel.java:118)
    at photoproductionsystem.IncomingWIPPanel.<init>(IncomingWIPPanel.java:76)
    at photoproductionsystem.TabbedDisplay.<init>(TabbedDisplay.java:47)
    at photoproductionsystem.Display.create(Display.java:73)
    at photoproductionsystem.Display.init(Display.java:44)
    at photoproductionsystem.Display.main(Display.java:229)
    Caused by: java.lang.ArrayIndexOutOfBoundsException
    at java.lang.System.arraycopy(Native Method)
    at org.apache.poi.hssf.record.UnknownRecord.<init>(UnknownRecord.java:62)
    at org.apache.poi.hssf.record.SubRecord.createSubRecord(SubRecord.java:57)
    at org.apache.poi.hssf.record.ObjRecord.fillFields(ObjRecord.java:99)
    at org.apache.poi.hssf.record.Record.fillFields(Record.java:90)
    at org.apache.poi.hssf.record.Record.<init>(Record.java:55)
    at org.apache.poi.hssf.record.ObjRecord.<init>(ObjRecord.java:61)
    ... 15 more
    Can someone please help me with my problem? Thanks a lot in advance!

    Madeline wrote:
    how do I ask at Apache mailing list?I wonder why it seems to be a strange idea to some people to look at the software vendor's site for product support. :p
    http://poi.apache.org/mailinglists.html

  • MS SQL database needs to run mdx query to analysis services to retrieve data from a BPC 10 Netweaver cube(view only)

    We are in the process of migrating from BPC7 SP12 Microsoft sql server to BPC10 netweaver on a sql server with BW7.4 and need to integrate our home grown data warehouse which is on a Microsoft sql server.  The data warehouse currently connects to BPC7 using integration services/analysis services and runs mdx queries to analysis services to retrieve data from the BPC7 cube (view only).  Please provide documentation on how to create this same integration with our data warehouse using BPC10 netweaver on a sql server.

    When you were setting up your ODBC data source for
    the Text driver, did you click on the "Options"
    button? There's a lot of options in there that I
    didn't understand at first glance.Yes I clicked on the options button, but the only thing there is dealing with file extensions. I left it set to the default.
    I have since tried closing my connection after I insert a record, I then try executeQuery, but still no luck. Seems strange that I can write to the file but not read from it. If any thing I'd expect the opposite problem.
    I have also tried using the class "JoltReport" from the sun tutorial instead of my own with the same result.
    Message was edited by:
    Hentay

Maybe you are looking for