Fetching more than one row from a table after selecting one value from the dropdown

Hi Experts,
How can we fetch more than one row from a table after selecting one value from the dropdown.
The scenario is that I have some entries in the dropdown like below
  A               B               C        
11256          VID          911256  
11256          VID          811256
11256          SONY      11256
The 'B' values are there in the dropdown. I have removed the duplicate entries from the dropdown so now the dropdownlist has only two values.for eg- 'VID' and'SONY'. So now, after selecting 'VID' from the dropdown I should get all the 'C' values. After this the "C' values are to be passed to other methods to fetch some data from other tables.
Request your help on this.
Thanks,
Preeetam Narkhede.

Hi Preetam!
I hope I understand your request proberly, since this is more about Java and less about WebDynpro, but if I'm wrong, just follow up on this.
Supposed you have some collection of your original table data stored in variable "origin". Populate a Hashtable using the values from column "B" (let's assume it's Strings) as keys and an ArrayList of whatever "C" is (let's assume String instances, too) as value (there's a lot of ways to iterate over whatever your datasource is, and since we do not know what your datasource is, maybe you'll have to follow another approach to get b and c vaues,but the principle should remain the same):
// Declare a private variable for your Data at the appropriate place in your code
private Hashtable temp = new Hashtable<String, ArrayList<String>>();
// Then, in the method you use to retrieve backend data and populate the dropdown,
// populate the Hashtable, too
Iterator<TableData> a = origin.iterator();
while (a.hasNext()) {
     TableData current = a.next();
     String b = current.getB();
     String c = current.getC();
     ArrayList<String> values = this.temp.get(b);
     if (values == null) {
          values = new ArrayList<String>();
     values.add(c);
     this.temp.put(b, values);
So after this, you'll have a Hashtable with the B values als keys and collections of C values of this particular B as value:
VID --> (911256, 811256)
SONY --> (11256)
Use
temp.keySet()
to populate your dropdown.
After the user selects an entry from the dropdown (let's say stored in variable selectedB), you will be able to retrieve the collection of c's from your Hashtable
// In the metod you handle the selection event with, get the c value collection
//and use it to select from your other table
ArrayList<String> selectedCs = this.temp.get(selectedB);
// now iterate over the selectedCs items and use each of these
//to continue retrieving whatever data you need...
for (String oneC : selectedCs) {
     // Select Data from backend using oneC in the where-Clause or whatever...
Hope that helps
Michael

Similar Messages

  • I am using reader 11.0.10.32 Win7 64 bit.  I am unable to print from Reader.  After selecting print all pages, the pri

    I am using reader 11.0.10.32 in Win7 Professional 64 bit.  I am unable to print from Reader.  After selecting print all pages, the progress bar goes through the proper page count. After that a pop up window appears with the message: The document could not be printed.  After pressing the OK button that pop up closes and the next pop up window appears with the message: There were no pages selected to print.  After pressing the OK button, the pop up closes and the pdf document is still visible in Reader.
    I can print from other programs to that printer.  I can print from Reader to other printers.
    I was able to print to all printers before.  I uninstalled Reader and reinstalled it from the Adobe web site.
    Any suggestions to make it print?
    Thanks.

    Answered multiple times every day: open Adobe Reader | Edit | Preferences
    under Documents, change 'View documents in PDF/A mode' to Never
    under Security (Enhanced), disable Protected Mode at startup

  • Update columns in Table A based on columns in Table B for more than 500K rows

    Guys,
    I need to update 9 columns in table A based on value from table B for for more than 500K rows.
    So what is best way to achieve this. I am thinking of writing a Procedure with cursor to update the rows of table A.
    When i googled about it, they say cursor will decrease the performance. So i have no clue how to go for this.
    Rough code which i though
    1) Procedure  with no parameter
    2) Will declare 9 variable to store value from cursor
    3) cursor will fetch row by row based on join condition between table a and table b
    4) i will pass column values from table B to variables
    5) will make an update statement for table A
    Please let me know if above method is correct or is there any other way to do this without using cursor.

    Guys,
    Below is the rough code i wrote as per my requirement. Does it look correct? As of now i dont have any platform to test it so any help with the below code is highly appreciated.  As i said i need to update more than 500K rows by matching Table
    A and Table B.  One more thing which i would like to add in below code, is to get log of all the rows that are in table B but not exist in table A.  Table A already has more than million data in it.
    Also not sure how the loop in below code willl run when @rowcount is become to zero?
    Please let me know if i need to consider performance related impact while running the script.
    GO
    SET SERVEROUTPUT ON
    CREATE PROCEDURE ONETIMEUPDATE
     DECLARE @cnt INT;
     SET @cnt = 1;
     DECLARE @MSG varchar(255);
     DECLARE @COUNT_VAR INT;
     SET @COUNT_VAR=0;
     WHILE @cnt > 0
        BEGIN
      Update TOP (50000) A
      Set A.Col1=B.Col1,
          A.COL2=B.COL2,
          A.COL3=B.COL3,
          A.COL4=B.COL4,
          A.COL5=B.COL5,
          A.COL6=B.COL6,
          A.COL7=B.COL7
      From TableA A
             Inner Join TableB B
             on A.ID = B.ID--ID
             WHERE A.Col1 <> B.Col1
                    OR A.Col2 <> B.Col2;
              SET @cnt = @@ROWCOUNT;
             IF @@ROWCOUNT=25000
               @COUNT_VAR=@COUNT_VAR + @@ROWCOUNT
               SELECT @MSG = CONVERT(varchar, @COUNT_VAR) + "Rows Updated" -- I WANT TO DISPLAY UPDATE after EVERY 25000 ROWS
              PRINT @MSG
      IF @@ROWCOUNT=0
         BEGIN    
               COMMIT
                       END
                    WAITFOR DELAY '00:00:01'  --wait for a second before the next update
                END;
     END;

  • How to display more than 200 rows in the table?

    Hi Experts,
    Is that possible to display more than 200 rows in a Table.
    when i query from table, it has 1000 rows, i want to display all the 1000 rows in the Table.
    when i query, the values are displaying up to 201 rows only,
    when i click next on 200 - 201 it throws Exception says
    *"Query has exceeded 200 rows. Potentially more rows exist, please restrict your query."*
    let me know how to display all the 1000 rows in a table without Exception.
    Any idea will be highly appreciated.
    Thanks
    Aswath

    The number of rows retrieved is controlled by profile option "FND: View Object Max Fetch Size". I believe 200 is the default value. Pl see these MOS Docs
    386402.1- Query Has Exceeded 200 Rows
    275876.1 - Oracle Application Framework Profile Options Release 11i (11.5.10)
    HTH
    Srini

  • Unable to insert more than 9 rows at a time

    Hi there,
    I have to insert more than 5000 rows in my table at a time,but i am not able to insert more than 10 ROWS AT ATIME.
    Do we need to do some that at the data base level for this to happen??????
    Thanks in Advance.

    Rather than give us unhelpful comments like "still its not taking", why don't you show us exactly what you're doing? We can't help you if you don't give us enough information.
    I've tried it and it works fine:
    SQL> create table customer (dealership_id number,
      2  region varchar2(100),
      3  customer_no number,
      4  firstname varchar2(100),
      5  lastname varchar2(100),
      6  address varchar2(100),
      7  city varchar2(100),
      8  state varchar2(100),
      9  zip varchar2(100),
    10  country varchar2(100),
    11  phone_number varchar2(100),
    12  email varchar2(100),
    13  gender varchar2(1),
    14  age number,
    15  transaction_date date);
    Table created.
    SQL> ed
    Wrote file afiedt.buf
      1  begin
      2  INSERT INTO CUSTOMER ( DEALERSHIP_ID, REGION, CUSTOMER_NO, FIRSTNAME, LASTNAME, ADDRESS, CITY,
      3  STATE, ZIP, COUNTRY, PHONE_NUMBER, EMAIL, GENDER, AGE,
      4  TRANSACTION_DATE ) VALUES (
      5  1, 'West', 546, 'Maria L', 'Umali', '515 W 59th St', 'San Francisco', 'California'
      6  , 10019, 'United Sta', '2122478223', 'null', 'F', 39, TO_Date( '01/10/2005 12:00:00 AM', 'MM/DD/YYYY HH:MI:SS AM'));
      7  INSERT INTO CUSTOMER ( DEALERSHIP_ID, REGION, CUSTOMER_NO, FIRSTNAME, LASTNAME, ADDRESS, CITY,
      8  STATE, ZIP, COUNTRY, PHONE_NUMBER, EMAIL, GENDER, AGE,
      9  TRANSACTION_DATE ) VALUES (
    10  24, 'East', 547, 'Justa', 'Viafara', '66 Avenue C', 'Charleston', 'West Virginia'
    11  , 10009, 'United Sta', '2126736156', 'null', 'F', 39, TO_Date( '01/10/2005 12:00:00 AM', 'MM/DD/YYYY HH:MI:SS AM'));
    12  INSERT INTO CUSTOMER ( DEALERSHIP_ID, REGION, CUSTOMER_NO, FIRSTNAME, LASTNAME, ADDRESS, CITY,
    13  STATE, ZIP, COUNTRY, PHONE_NUMBER, EMAIL, GENDER, AGE,
    14  TRANSACTION_DATE ) VALUES (
    15  22, 'East', 548, 'C', 'Vignola', '41 Carmine St', 'Miami', 'Florida', 10014, 'United Sta'
    16  , '2122436687', 'null', 'F', 39, TO_Date( '01/10/2005 12:00:00 AM', 'MM/DD/YYYY HH:MI:SS AM'));
    17  INSERT INTO CUSTOMER ( DEALERSHIP_ID, REGION, CUSTOMER_NO, FIRSTNAME, LASTNAME, ADDRESS, CITY,
    18  STATE, ZIP, COUNTRY, PHONE_NUMBER, EMAIL, GENDER, AGE,
    19  TRANSACTION_DATE ) VALUES (
    20  2, 'West', 549, 'Catherine', 'Vignola', '16 Barrow St', 'San Diego', 'California'
    21  , 10014, 'United Sta', '2129297697', '[email protected]', 'F', 39, TO_Date( '01/10/2005 12:00:00 AM', 'MM/DD/YYYY HH:MI:SS AM'));
    22  INSERT INTO CUSTOMER ( DEALERSHIP_ID, REGION, CUSTOMER_NO, FIRSTNAME, LASTNAME, ADDRESS, CITY,
    23  STATE, ZIP, COUNTRY, PHONE_NUMBER, EMAIL, GENDER, AGE,
    24  TRANSACTION_DATE ) VALUES (
    25  10, 'West', 550, 'Ashley', 'Weare', '275 W 96th St', 'Oakland', 'California', 10025
    26  , 'United Sta', '2128652935', '[email protected]', 'F', 39, TO_Date( '01/10/2005 12:00:00 AM', 'MM/DD/YYYY HH:MI:SS AM'));
    27  INSERT INTO CUSTOMER ( DEALERSHIP_ID, REGION, CUSTOMER_NO, FIRSTNAME, LASTNAME, ADDRESS, CITY,
    28  STATE, ZIP, COUNTRY, PHONE_NUMBER, EMAIL, GENDER, AGE,
    29  TRANSACTION_DATE ) VALUES (
    30  9, 'West', 551, 'Shamire A', 'Zobadi', '446 W 46th St', 'San Jose', 'California', 10036
    31  , 'United Sta', '2129740994', 'null', 'F', 39, TO_Date( '01/10/2005 12:00:00 AM', 'MM/DD/YYYY HH:MI:SS AM'));
    32  INSERT INTO CUSTOMER ( DEALERSHIP_ID, REGION, CUSTOMER_NO, FIRSTNAME, LASTNAME, ADDRESS, CITY,
    33  STATE, ZIP, COUNTRY, PHONE_NUMBER, EMAIL, GENDER, AGE,
    34  TRANSACTION_DATE ) VALUES (
    35  20, 'East', 552, 'Iride', 'Ciaccio', '130 Wisner Ave', 'Baltimore', 'Maryland', 12550
    36  , 'United Sta', '9145612058', '[email protected]', 'F', 39, TO_Date( '01/10/2005 12:00:00 AM', 'MM/DD/YYYY HH:MI:SS AM'));
    37  INSERT INTO CUSTOMER ( DEALERSHIP_ID, REGION, CUSTOMER_NO, FIRSTNAME, LASTNAME, ADDRESS, CITY,
    38  STATE, ZIP, COUNTRY, PHONE_NUMBER, EMAIL, GENDER, AGE,
    39  TRANSACTION_DATE ) VALUES (
    40  17, 'Central', 553, 'Cecil', 'Jackson', '30 Lake Dr', 'Houston', 'Texas', 12550, 'United Sta'
    41  , '9145617354', '[email protected]', 'F', 39, TO_Date( '01/10/2005 12:00:00 AM', 'MM/DD/YYYY HH:MI:SS AM'));
    42  INSERT INTO CUSTOMER ( DEALERSHIP_ID, REGION, CUSTOMER_NO, FIRSTNAME, LASTNAME, ADDRESS, CITY,
    43  STATE, ZIP, COUNTRY, PHONE_NUMBER, EMAIL, GENDER, AGE,
    44  TRANSACTION_DATE ) VALUES (
    45  4, 'West', 554, 'M P', 'Prabhu', '590 River Rd', 'Scottsdale', 'Arizona', 12550, 'United Sta'
    46  , '9145656155', 'null', 'F', 39, TO_Date( '01/10/2005 12:00:00 AM', 'MM/DD/YYYY HH:MI:SS AM'));
    47  INSERT INTO CUSTOMER ( DEALERSHIP_ID, REGION, CUSTOMER_NO, FIRSTNAME, LASTNAME, ADDRESS, CITY,
    48  STATE, ZIP, COUNTRY, PHONE_NUMBER, EMAIL, GENDER, AGE,
    49  TRANSACTION_DATE ) VALUES (
    50  16, 'Central', 555, 'Jacob', 'Agam', '221 E 61st St', 'Ann Arbour', 'Michigan', 10021
    51  , 'United Sta', '2127524408', '[email protected]', 'M', 39, TO_Date( '01/10/2005 12:00:00 AM', 'MM/DD/YYYY HH:MI:SS AM'));
    52  INSERT INTO CUSTOMER ( DEALERSHIP_ID, REGION, CUSTOMER_NO, FIRSTNAME, LASTNAME, ADDRESS, CITY,
    53  STATE, ZIP, COUNTRY, PHONE_NUMBER, EMAIL, GENDER, AGE,
    54  TRANSACTION_DATE ) VALUES (
    55  23, 'East', 556, 'Alkis', 'Agaphogleous', '208 W 15th St', 'Fairfax', 'Virginia', 10011
    56  , 'United Sta', '2126478725', '[email protected]', 'M', 39, TO_Date( '01/10/2005 12:00:00 AM', 'MM/DD/YYYY HH:MI:SS AM'));
    57  INSERT INTO CUSTOMER ( DEALERSHIP_ID, REGION, CUSTOMER_NO, FIRSTNAME, LASTNAME, ADDRESS, CITY,
    58  STATE, ZIP, COUNTRY, PHONE_NUMBER, EMAIL, GENDER, AGE,
    59  TRANSACTION_DATE ) VALUES (
    60  19, 'East', 557, 'Ponti C', 'Cia', '251 Central Park W', 'New York', 'New York', 10024
    61  , 'United Sta', '2128777400', '[email protected]', 'M', 39, TO_Date( '01/10/2005 12:00:00 AM', 'MM/DD/YYYY HH:MI:SS AM'));
    62  INSERT INTO CUSTOMER ( DEALERSHIP_ID, REGION, CUSTOMER_NO, FIRSTNAME, LASTNAME, ADDRESS, CITY,
    63  STATE, ZIP, COUNTRY, PHONE_NUMBER, EMAIL, GENDER, AGE,
    64  TRANSACTION_DATE ) VALUES (
    65  27, 'West', 558, 'Steve', 'Ciabbatoni', '71 Broadway', 'Phoenix', 'Arizona', 10006
    66  , 'United Sta', '2128639140', '[email protected]', 'M', 39, TO_Date( '01/10/2005 12:00:00 AM', 'MM/DD/YYYY HH:MI:SS AM'));
    67  INSERT INTO CUSTOMER ( DEALERSHIP_ID, REGION, CUSTOMER_NO, FIRSTNAME, LASTNAME, ADDRESS, CITY,
    68  STATE, ZIP, COUNTRY, PHONE_NUMBER, EMAIL, GENDER, AGE,
    69  TRANSACTION_DATE ) VALUES (
    70  13, 'Central', 559, 'Pascale', 'Coadou', '307 E 89th St', 'Austin', 'Texas', 10028
    71  , 'United Sta', '2128769343', '[email protected]', 'M', 39, TO_Date( '01/10/2005 12:00:00 AM', 'MM/DD/YYYY HH:MI:SS AM'));
    72  INSERT INTO CUSTOMER ( DEALERSHIP_ID, REGION, CUSTOMER_NO, FIRSTNAME, LASTNAME, ADDRESS, CITY,
    73  STATE, ZIP, COUNTRY, PHONE_NUMBER, EMAIL, GENDER, AGE,
    74  TRANSACTION_DATE ) VALUES (
    75  21, 'East', 560, 'Arthur G', 'Coake', '95 W 95th St', 'Boston', 'Massachusetts', 10025
    76  , 'United Sta', '2122221851', '[email protected]', 'M', 39, TO_Date( '01/10/2005 12:00:00 AM', 'MM/DD/YYYY HH:MI:SS AM'));
    77  INSERT INTO CUSTOMER ( DEALERSHIP_ID, REGION, CUSTOMER_NO, FIRSTNAME, LASTNAME, ADDRESS, CITY,
    78  STATE, ZIP, COUNTRY, PHONE_NUMBER, EMAIL, GENDER, AGE,
    79  TRANSACTION_DATE ) VALUES (
    80  15, 'Central', 561, 'B P', 'Coakley', '139 W 35th St', 'Minneapolis', 'Minnesota'
    81  , 10001, 'United Sta', '2126863187', 'null', 'M', 39, TO_Date( '01/10/2005 12:00:00 AM', 'MM/DD/YYYY HH:MI:SS AM'));
    82* end;
    SQL> /
    PL/SQL procedure successfully completed.
    SQL> select count(*) from customer;
      COUNT(*)
            16

  • Apex4.2 - Interactive report display more than 15 rows

    How is it possible to show more than 15 rows?
    If I set up in repoert attributes the row number less than 15 it works but e.g. 100
    it only show me 15 and the page button to the next page.
    How is it possible to work with 120 records so that 100 will be shown
    and 20 on the next page?

    Hi,
    When you run your page where is IR, you can from action menu control how many rows are displayed per page
    http://docs.oracle.com/cd/E37097_01/doc/doc.42/e35125/ir_using.htm#sthref1354
    Regards,
    Jari
    My Blog: http://dbswh.webhop.net/htmldb/f?p=BLOG:HOME:0
    Twitter: http://www.twitter.com/jariolai

  • Advanced table:not able to view more than 10 rows when called from workflow

    Hi everyone,
    I'm calling a page that contains advanced table and its controller class from two places.
    First one is from a inquiry form, when this page is called it works fine. when there are more than 10 rows, first 10 are shown on page render and when we click on Next link, other rows are shown. This is becuase I have given the records displayed property on adavanced table = 10. I'm fine till here.
    Second one is I'm calling this page again from a workflow notificaiton. There is a link called view more details on the workflow notification , click of this link will open the page with 10 records displayed. But when user tries to click on Next it doesn't work. It just doesn't refresh.
    Its very wierd,. not able to understand what could be wrong when calling from wf notificiton. Its the same page and conroller code used in both the places.
    Please help me!!
    Thanks
    Sunny

    Thanks for your response Kristofer. You are correct, there was a difference in the parameters and the issue is resolved now.

  • Not uploading more than 150 rows from Excel file to Internal table.

    Hi All,
    We have a Z program to upload initial stock from excel file to SAP using BAPI. The problem is we have defined row to '65536'. But it is not uploading more than 150 rows at a time. The piece of code is given below.
    DATA : it_excel LIKE alsmex_tabline OCCURS 0 WITH HEADER LINE.
    DATA: xcel TYPE TABLE OF alsmex_tabline WITH HEADER LINE.
    DATA : gd_scol   TYPE i VALUE '1',
           gd_srow   TYPE i VALUE '3',
           gd_ecol   TYPE i VALUE '256',
           gd_erow   TYPE i VALUE '65536'.
    PERFORM upload_excel_file TABLES   gt_out
                                  USING   p_file
                                          gd_scol
                                          gd_srow
                                          gd_ecol
                                          gd_erow.
    FORM upload_excel_file  TABLES   gt_out
                                       "Insert correct name for <...>
                            USING    p_p_file
                                     p_gd_scol
                                     p_gd_srow
                                     p_gd_ecol
                                     p_gd_erow.
      DATA : lt_intern TYPE  kcde_cells OCCURS 0 WITH HEADER LINE.
      DATA : ld_index TYPE i.
      FIELD-SYMBOLS: <fs> TYPE ANY.
      CALL FUNCTION 'KCD_EXCEL_OLE_TO_INT_CONVERT'
        EXPORTING
          filename    = p_p_file
          i_begin_col = p_gd_scol
          i_begin_row = p_gd_srow
          i_end_col   = p_gd_ecol
          i_end_row   = p_gd_erow
        TABLES
          intern      = lt_intern[].
      IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      IF lt_intern[] IS INITIAL.
        FORMAT COLOR COL_BACKGROUND INTENSIFIED.
        WRITE:/ 'No Data Uploaded'.
        EXIT.
      ELSE.
        SORT lt_intern BY row col.
        LOOP AT lt_intern.
          MOVE lt_intern-col TO ld_index.
          ASSIGN COMPONENT ld_index OF STRUCTURE gt_out TO <fs>.
          MOVE lt_intern-value TO <fs>.
          AT END OF row.
            APPEND gt_out.
            CLEAR gt_out.
          ENDAT.
        ENDLOOP.
      ENDIF.
    ENDFORM.           
    Plz tell me, what is the problem here. I want to upload all the rows at a time.
    Thanks,
    With regards,
    Rosaline.

    Hi Rob, I confirm, you're nitpicking! :-D For information, I've noted a few SAP comments about releasing and released objects, for people who like reading: [SAP Library - Documenting and Releasing a Function Module|http://help.sap.com/saphelp_nw70/helpdata/en/d1/801f50454211d189710000e8322d00/frameset.htm], [Note 109533 - Use of SAP function modules|https://service.sap.com/sap/support/notes/109533], [Note 415983 - Modification/customer developments of SAP function modules|https://service.sap.com/sap/support/notes/415983]; Example of an unreleased BAPI -> [Note 577453 - Using BAPI BAPI_DELIVERYPROCESSING_EXEC|https://service.sap.com/sap/support/notes/577453]
    Sandra

  • Trouble with the SQL smt to :list tables having more than 1000 rows

    Please I trying to list only tables having more than 1000 rows, but the sql stmt below doesn't work, can someone gives me a tips
    select table_name from user_tables where table_name in ( select table_name from user_tables where rownum > 1000 ) : The result is no rows!
    But I know that I have at lest 50 tables having more than 1000 rows
    Thanks a lot for the help

    If your tables are reasonably analyzed, then you can simply query:
    SELECT table_name,
           num_rows
      FROM user_tables
    WHERE num_rows >= 1000This will give you quite a reasonable estimate.
    Otherwise you have to go for dynamic sql or use the data dictionary to help you generate suitable scripts ....

  • Export from Discoverer to Excel more than 65K rows

    Hi
    I need to export data from discoverer to excel, in some cases it is more than 65K rows, does any body know if the file can be split in multiple files o worksheets in Excel?
    Any help will be appreciate
    Thanks
    Vladimir

    Russ
    The short answer is I didn't know, as in any instance where my end users have wanted to extract large amounts of data they have done it from one sheet, I expected that Discoverer would just create the extra sheets for both but I wanted to know for sure, so I did a test.
    I created a Disco workbook with two worksheets in it, the first one I called Monthly and it had 119,409 rows in it, the second I called Weekly and it had 299,775.
    The first time I did the export I did it by hitting the Excel icon on the toolbar, it therefore only extracted the first worksheet (Monthly), when I opened the ensuing Excel file it had two worksheets in it, one called Monthly, the other called Monthly_1 and as expected, between the two sheets the had exactly the same number of fields as in the original disco sheet.
    I then redid the extract going through the menu and chossing extract entire workbook, Discoverer then re-extracted the sheets. In the Excel file this time I had the same two monthly sheets as before and this time I also had weekly sheets, five of them. So I ended up with an Excel file with seven sheets containing all of the original data.
    Cheers
    Melanie

  • FETCHING VALUES IN MULTI RECORD BLOCK FROM ANOTHER TABLE USING SELECT STATEMENT.

    Hi,
    I have one multi record block in which i want to fetch values
    (more then one record) from another table using select statement
    IN KEY NEXT ITEM.I am getting following error.
    ORA-01422: exact fetch returns more than requested number of rows
    Thanks in advance.

    In your case I see no reason to use non-database block and to try to populate it from a trigger with a query, instead of using the default forms functionality where you can associate the block and the fields with table, create where clause using bind variables and simply use execute_query() build-in to populate the block. The power of the forms is to use their build-in functionality to interact with the database.
    Also, you can base your block on a query, not on a table and you dynamically change this query using set_block_property() build-in. You can use any dynamic queries (based on different data sources) and you simply need to control the column's data type, the number of the columns and their aliases. Something like creating inline views as a block data source.
    However, you can replace the explicit cursor with implicit one like
    go_block('non_db_block_name');
    first_record();
    FOR v_tab IN (SELECT *
    FROM tab
    WHERE col_name = :variable)
    LOOP
    :non_db_block_name.field1 := v_tab.col1;
    :non_db_block_name.field2 := v_tab.col2;
    next_record();
    END LOOP;

  • Can't insert more than 8000 rows to excel via JOB

    Hello, 
    I have SSIS package where I have two tasks.
    File System task copies file (with header names) to destination folder.
    Data flow task export data from table to copied Excel file. Select are simple "select * from table" without any filters.
    There are about 100 000 rows in the table.
    When I run this task through Visual studio everything works fine. Data to Excel file is exported.
    When I run this package in JOB (Job Activity Monitor) the file is created but 0 rows is exported.
    One interesting thing, that when I use select "select top 7000 * from table" 7000 rows is inserted but when I try to export more than 8000 rows then 0 rows is exported. The JOB generates 0 errors. In fact he tries to export. Because all the time
    Excel's file "Date modified" is changing.
    It seems like data is exported but the final "commit" isn't done. Anybody knows where could be a problem?

    Out of curiosity I have had a go at reading 70K lines of data from a table in a sql server and exporting them to an excel 2007 file:
    SSIS 2012 project deployment
    2 project connections: sql database connection for source
    and an Excel 2007 connection for destination:
    Provider=Microsoft.ACE.OLEDB.12.0;Data Source=F:\Data\Outbox\ExcelOut.xlsx;Extended Properties="Excel 12.0 XML;HDR=YES";
    I have an empty excel 2007 file as template with header rows in the first sheet.
    I test the project in VS 2012, ran without problems. 
    I set DelayValidation to true on package level, data flow level.
    In data flow, excel distination, ValidataExternal metadata to False. 
    I deploy the project with the package to an Integration Services catalog on a SQL 2012 server (not my development machine)
    I copy an empty excel 2007 file (with the headers in the first row) in the correct file location.
    I execute the package from SSMS in the Integration services catalogs, with 32 bit checked.
    The package runs without errors. 
    I can open the excel file and see 70K records.
    Last thought: I have no NULL values in my data. Do you have null values after the first 7000 records? Or is one of the excel columns expecting numerical data where it suddenly finds alfanumeric after 7000 rows?
    Another suggestion: if you run the package with SSMS from the catalog, you can set the verbose reporting mode on, does that tell you anything more?
    Jan D'Hondt - SQL server BI development

  • Copy and Paste Large (more than 999 rows) Spreadsheet

    I have a large spreadsheet that has a number of hidden columns.  It is about 1,135 rows long.  I have no trouble copying and pasting the spreadsheet into Pages (both are IWork '09) as long as I only try to copy and past 999 or fewer rows.  But when I try to copy and paste more than 999 rows, I only get the cell contents pasted into Pages.  The cell borders and formatting all get removed.  I have tried different groupings of 999 and always get the same results whether I am trying it will range 1-999 or 100-1099.  999 cells can be copied and pasted, but 1,000 or more get stripped of any formatting during the paste.  Any suggestions?  I've tried rebooting, running disk utility and renaming the Numbers document.  I've tried copying and pasting the contents of the numbers document into a new numbers document, but get the same results.  I've exported the Numbes document as an Excel document and reopened it using Numbers but still get the same results.  Anybody got any suggestions?  I'm running OS X 10.6.8 and everything is current.

    Hello
    To be complete on the subject, I tested the number of columns allowed by Pages in a table.
    The document format, portrait or landscape, doesn't matter. Pages accept only 65 columns.
    This limit may have a simple explanation :
    in Binary format, 64 is represented by 1000000
    and of course as we start from 0, 7 digits allow to define 65 values.
    For the 999 rows limit I have no idea. The binary representation of 998 is : 1111100110
    I would be surprised  that Apple use the decimal system to count the rows and if it does, the logical limit wasn't 999 but 1000 which is the count of integers from 0 thru 999.
    At this time the larger table which I use regularly is a Numbers one with 5296 rows in which I store the references to Apple Technotes. It receive about 20 new rows every week.
    I splitted the original 6942 rows one in two tables : the one with 'living' technotes and a 1646 rows one storing the now obsolete technotes.
    15 days ago, it was an AW6 database but I decided that it was time to to switch it in today's application.
    Yvan KOENIG (VALLAURIS, France)  07 /11 /2011 21:38:53
    iMac 21”5, i7, 2.8 GHz, 4 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.2
    My iDisk is : <http://public.me.com/koenigyvan>
    Please : Search for questions similar to your own before submitting them to the community

  • Fetch more than 1000 records

    Hi,
    I am using APEX_ITEM.SELECT_LIST_FROM_QUERY_XL(). When I try to fetch more than 1000 records in PL/SQL block .It throws character string buffer too small. I donot know how much records it will fetch because it is dynamically generated.
    could you please anyone help me out.

    Hi
    I agree that a popup LOV would be better, for two reasons:
    1 - Even if you could construct a select list with over 1,000 items, users may find it awkward to use as they would have to scroll to find the item they want - at best they could type in the first character of an item but they'd have to scroll from then on or keep pressing the same character to move down one item at a time.
    2 - The fact that you're using that function to generate the list implies that you are using a tabular form and, therefore, that there will be several instances of the list on your page. If so, the time taken to generate the page and download it may slow page load time considerably.
    If you do need to have select lists, there are techniques that you can use to do this - typically, this would involve creating small lists in the form, a hidden select list created as a normal page item and then using javascript to copy the hidden list items into the tabular form fields.
    Andy

  • Can't fetch more than 131 columns

    Hi
    I've got table A with ~170 column of type VARCHAR(40).
    When I try to fetch more than 131 columns in a select statement, I get the following error:
    Error in TTCmd::Execute(): cannot execute unprepared statement.*** Command execution of statement <<null>> failed.
    When I stay at <= 131 fetched columns, everything's fine.
    Can anybody around here tell me what I can do to solve this problem? I'll need to fetch all 170 columns.
    Best Regards
    Frans van der Reijden

    Hi Chris
    I increased MAX_TTCMD_PARAMS and MAX_TTCMD_COLUMNS to 256, made new libraries and got a differenct error message. When I try to fetch all 172 rows of my table, I get a different error msg now:
    *** Error in TTCmd::Execute(): cannot execute unprepared statement.*** Command execution of statement <<null>> failed.
    Again, when I decrease the number of fetched rows < 131, the fetch cycle is fine.
    I'd like to take advantage of your offer to check my code, although I don't expect the error to be in the application code. Where can I send it too?
    Regards
    Frans

Maybe you are looking for