Selecting only required number of rows in an external table

Hi,
I have an external table with many flat files as source.. I know I can skip rows using the keyword 'SKIP'. I want to select only first 'n' rows from all the flat files as the rows available in my oracle external table. Is this Possible?...
eg..
Flat file 1
c1,c2
123,45
132,56
'ahgh',34
'dfd',22
Flat file 2
c1,c2
56,1212
545,45
'ahcsd',4
'dds',24
I want to create a file which contains the rows, means only the 2nd and 3rd rows from each flat files
123,45
132,56
56,1212
545,45
Thanks in Advance
Poulose

If this means selecting from all these flat files at the same time then it might get a bit cumbersome. Basically you will have to create an external table for each flat file and then do something like this:
SELECT * FROM
  ( select c1, c2 from
     ( select c1, c2, rownum as rn from ext_table_1 )
    where rn in (2, 3)
   union all
    select c1, c2 from
     ( select c1, c2, rownum as rn from ext_table_2 )
    where rn in (2, 3)
   union all
  select c1, c2 from
     ( select c1, c2, rownum as rn from ext_table_3 )
    where rn in (2, 3)
   union all
/Cheers, APC

Similar Messages

  • XMLIndex: finding indexed XPaths and the number of rows in the path table

    Hi,
    I am storing non-schema-based binary XMLs in an XMLType column in 11g (11.1.0.6.0) and would like to index the XMLs either partially or fully using XMLIndex. I'm expecting to have a large number (tens of millions) of XML documents and have some concerns about the size of the XMLIndex path table.
    In short, I am worried that the path table might grow unmanageable large. In order to avoid this and to plan for table partitioning, I would like to create a report of all indexed XPaths in an XMLIndex and to find out how many times each path is actualized in the path table. I would do this for a representative XML sample.
    I have been creating XMLIndexes with different exclude/include paths, gathering stats with DBMS_STATS (estimate_percent = 100) and selecting the number of rows in the path table through USER_TABLES.
    If anyone knows a more straightforward way of doing this all advice is very much appreciated.
    Best Regards,
    Rasko Leinonen

    Thanks Marco,
    I managed to get out all indexed paths using the following SQL. It took a while to understand how the join the XDB.X$PT39CW6BJR8W4VVE0G0LLGA0OCR5 and XDB.X$QN39CW6BJR8W4VVE0G0LLGA0OCR5 tables together but got there in the end. This helps to clarify which XPaths are being currently indexed by the XMLIndex.
    begin
    for v_row in (select PATH from XDB.X$PT39CW6BJR8W4VVE0G0LLGA0OCR5)
    loop
    declare
    v_i BINARY_INTEGER := 1;
    v_id raw(8);
    v_len BINARY_INTEGER := 2;
    v_skip BINARY_INTEGER := 1;
    begin
    while v_i < utl_raw.length(v_row.path) and
    v_i + v_len <= utl_raw.length(v_row.path)
    loop
    v_i := v_i + v_skip;
    v_id := utl_raw.substr(v_row.path, v_i, v_len);
    --dbms_output.put_line(v_id);
    for v_row2 in (select LOCALNAME, flags from XDB.X$QN39CW6BJR8W4VVE0G0LLGA0OCR5
    where ID = v_id )
    loop
    if rawtohex(v_row2.flags) = '01'
    then
    dbms_output.put('@');
    end if;
    dbms_output.put(v_row2.localname);
    if v_i + v_len < utl_raw.length(v_row.path)
    then
    dbms_output.put('/');
    end if;
    end loop;
    v_i := v_i + v_len;
    end loop;
    dbms_output.put_line('');
    end;
    end loop;
    end;
    Example output:
    RUN
    RUN/@accession
    RUN/@alias
    RUN/@instrument_model
    RUN/@run_date
    RUN/@run_center
    RUN/@total_data_blocks
    RUN/EXPERIMENT_REF
    RUN/EXPERIMENT_REF/@accession
    RUN/EXPERIMENT_REF/@refname
    RUN/DATA_BLOCK
    RUN/DATA_BLOCK/@name
    RUN/DATA_BLOCK/@total_spots
    RUN/DATA_BLOCK/@total_reads
    RUN/DATA_BLOCK/@number_channels
    RUN/DATA_BLOCK/@format_code
    RUN/DATA_BLOCK/@sector
    RUN/DATA_BLOCK/FILES
    RUN/DATA_BLOCK/FILES/FILE
    RUN/DATA_BLOCK/FILES/FILE/@filename
    RUN/DATA_BLOCK/FILES/FILE/@filetype
    RUN/RUN_ATTRIBUTES
    RUN/RUN_ATTRIBUTES/RUN_ATTRIBUTE
    RUN/RUN_ATTRIBUTES/RUN_ATTRIBUTE/TAG
    RUN/RUN_ATTRIBUTES/RUN_ATTRIBUTE/VALUE

  • Resukt:Get number of rows from 3 different table...?

    Hi All,
    I need to find out number of rows from 3 different table for the same conditions. Instead of writing 3 queries, is it possible to get it thru one query?
    For example, i need to find out number of rows in tables where name = 'Ameet' from 3 different table, i will end writing 3 queries.
    1. select count(1) from table_a where name = 'Ameet';
    1. select count(1) from table_b where name = 'Ameet';
    1. select count(1) from table_c where name = 'Ameet';
    Is it possible to write a single query to get result of all above 3 queries?
    result:
    table_a table_b table_c
    34 44 2

    One way:
    SELECT      (SELECT     COUNT(*) AS CNT FROM TABLE_A WHERE name='Ameet') AS TABLE_A
    ,     (SELECT     COUNT(*) AS CNT FROM TABLE_B WHERE name='Ameet') AS TABLE_B
    ,     (SELECT     COUNT(*) AS CNT FROM TABLE_C WHERE name='Ameet') AS TABLE_C
    FROM DUALIf you want the total:
    SELECT     SUM(CNT)
    FROM
         SELECT     COUNT(*) AS CNT FROM TABLE_A WHERE name='Ameet'
         UNION ALL
         SELECT     COUNT(*) FROM TABLE_B WHERE name='Ameet'
         UNION ALL
         SELECT     COUNT(*) FROM TABLE_C WHERE name='Ameet'
    )

  • Select  a specific  number of rows in query

    How can a specific number of rows be selected in a query? For example, a query retrieves 30,000 records and I want to retrieve the output by groups of 5,000. I want the query to retrieve the first 5,000 records, then the next 5,000 records etc. I tried rownum but that does not work.
    Thanks,
    PANY

    Not AGAIN. Please...........
    Do you know how to Google? Search forum?
    Why do you ask this boring FAQ AGAIN?
    Sybrand Bakker
    Senior Oracle DBA
    Experts: Those who know how to search.

  • Selecting a small number of rows

    Hello,
    I am looking for something in PL/SQL that will allow me to return a limited number of rows. In other SQL's this might be something like:
    set row count=100
    select * from tab1 --- returns first 100 rows found

    SQL> select * from emp;
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
          7566 JONES      MANAGER         7839 02-APR-81       2975       1000         20
          7902 FORD       ANALYST         7566 03-DEC-81       3000                    20
          7839 KING       PRESIDENT            17-NOV-81       5000                    10
          7698 BLAKE      MANAGER         7839 01-MAY-81       2850                    30
          7782 CLARK      MANAGER         7839 09-JUN-81       2450                    10
          7369 SMITH      CLERK           7902 17-DEC-80        800                    20
          7499 ALLEN      SALESMAN        7698 20-FEB-81       1600        300         30
          7521 WARD       SALESMAN        7698 22-FEB-81       1250        500         30
          7654 MARTIN     SALESMAN        7698 28-SEP-81       1250       1400         30
          7788 SCOTT      ANALYST         7566 09-DEC-82       3000                    20
          7844 TURNER     SALESMAN        7698 08-SEP-81       1500          0         30
          7876 ADAMS      CLERK           7788 12-JAN-83       1100                    20
          7900 JAMES      CLERK           7698 03-DEC-81        950                    30
          7934 MILLER     CLERK           7782 23-JAN-82       1300                    10
    14 rows selected.
    SQL> select e.empno, e.ename, e.job, e.hiredate
      2    from (select rownum rn, empno, ename, job, hiredate
      3            from emp) e
      4   where e.rn <= 10;
         EMPNO ENAME      JOB       HIREDATE
          7566 JONES      MANAGER   02-APR-81
          7902 FORD       ANALYST   03-DEC-81
          7839 KING       PRESIDENT 17-NOV-81
          7698 BLAKE      MANAGER   01-MAY-81
          7782 CLARK      MANAGER   09-JUN-81
          7369 SMITH      CLERK     17-DEC-80
          7499 ALLEN      SALESMAN  20-FEB-81
          7521 WARD       SALESMAN  22-FEB-81
          7654 MARTIN     SALESMAN  28-SEP-81
          7788 SCOTT      ANALYST   09-DEC-82
    10 rows selected.
    SQL>

  • How to restrict number of row/lines in a table in RTF

    Hi,
    Im working on PO report. It has header information in the header part of RTF. But coming to the lines , I put that under a different group in the table in the body part of the RTF. I did a FOR loop for printing PO Lines because it does have multiple line information. But now i have to restrict the number of rows in that table per page irrespective of number of PO Lines. After printing 20 rows in the table, it should go to the next page. Im going through the other threads for the solution.
    Thanks,
    venkat

    There are so many thread regarding this ,
    pls go thru them patiently...
    logic is something like....
    use if condition and position() and say page-break..
    use for-each@section instead of for-each..so that the headed info is maintained with regards to PO lines
    happy searching...
    if you cant get still, last option send me mail with details

  • How to get the number of rows in a HTML table in some other page

    Hi,
    I am incrementing HTML table rows on button click and saving number of rows in a javascript variable. But on submitting that page I need that number of row value in the following page
    example:
    HTML table is in the page first.jsp
    and the javascript variable having the current row number is row_number
    on submitting it goes to second.jsp page. There i need that row_number value.
    Can anyone help me to solve this?
    regards,
    carry

    function buttonClick()
    var table = profileTable;
    var lnRow = table.rows.length;
    var insertedRow = table.insertRow(parseFloat(lnRow));
    var cell1 = insertedRow.insertCell();
    cell1.innerHTML ="<tr><td><Input type=\"hidden\" >>>name=\"rowNum\" value="+cnt"+></td></tr>";
    document.profileform.submit;
    on submit it goes to the second page, but the value i got using >>>System.out.println("row number from text >>>box"+request.getParameter("rowNum")); is null. What is wrong with >>>my coding. Can anyone solve this.HI carry
    Check the value of bold data
    function buttonClick()
    var table = profileTable;
    var lnRow = table.rows.length;
    var insertedRow = table.insertRow(parseFloat(lnRow));var cnt=inRow
    var cell1 = insertedRow.insertCell();
    cell1.innerHTML ="<tr><td><Input type=\"hidden\" >>>name=\"rowNum\" value="+cnt+"></td></tr>";
    document.profileform.submit;
    }try with it

  • HOW TO SELECT ONLY THOSE RECORDS WHERE NOT AVAILABLE ON SECOND TABLE

    hi
    i have two tables one name is menus and second name is UGroupDetail. Actually i have created it for user role privileges for my application
    USE [LedgerDB]
    GO
    /****** Object: Table [dbo].[Menus] Script Date: 03/28/2015 13:45:27 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE TABLE [dbo].[Menus](
    [RightID] [int] NOT NULL,
    [RightName] [nvarchar](200) NULL,
    [GroupID] [int] NULL,
    CONSTRAINT [PK_Menus] PRIMARY KEY CLUSTERED
    [RightID] ASC
    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
    ) ON [PRIMARY]
    second table is
    USE [LedgerDB]
    GO
    /****** Object: Table [dbo].[UGroupDetail] Script Date: 03/28/2015 13:46:12 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE TABLE [dbo].[UGroupDetail](
    [RightID] [int] NOT NULL,
    [RightName] [nvarchar](200) NULL,
    [GroupID] [int] NULL
    ) ON [PRIMARY]
    GO
    ALTER TABLE [dbo].[UGroupDetail] WITH CHECK ADD CONSTRAINT [FK_UGroupDetail_Menus] FOREIGN KEY([RightID])
    REFERENCES [dbo].[Menus] ([RightID])
    ON UPDATE CASCADE
    ON DELETE CASCADE
    GO
    ALTER TABLE [dbo].[UGroupDetail] CHECK CONSTRAINT [FK_UGroupDetail_Menus]
    GO
    ALTER TABLE [dbo].[UGroupDetail] WITH CHECK ADD CONSTRAINT [FK_UGroupDetail_UserGroup] FOREIGN KEY([GroupID])
    REFERENCES [dbo].[UserGroup] ([GroupID])
    ON UPDATE CASCADE
    ON DELETE CASCADE
    GO
    ALTER TABLE [dbo].[UGroupDetail] CHECK CONSTRAINT [FK_UGroupDetail_UserGroup]
    UGroupDetail have many groups as assigned to a new user but Menus table has only default groups which is 90 records
    Menus table is a primary table and UGroupDetail is a Foreign key table
    now i want to combined these tables and want to get only remaining records for each group
    for example i have assigned 5 roles to GroupID 2 and now when i apply select commands the result should be 85 out 90 for GroupID 2
    but i have not idea how to modify select query for get desired result

    I don't really understand the tables. What is GroupID doing in the Menues table? And what does an entry without a RightName mean? Shouldn't that column be NOT NULL?
    The UGroupDetail does not have any primary key. From your description, I would expect the PK to be (RightID, GroupID). But strangely enough, GroupID is nullable. So is RightName, but I think this column is redundant and should be removed.
    Anyway, if I understand your question correctly, you need something like:
    SELECT UG.Name, M.RightName
    FROM   UserGroups UG
    CROSS  JOIN Menus M
    WHERE  NOT EXISTS (SELECT *
                       FROM   UGroupDetail UGD
                       WHERE  UG.GroupID = UGD.GroupID
                         AND  UG.RightID = M.RightID)
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Updating a field for a number of forms from an external table

    Good Day All;
    This one I could not find in the help section.
    I have designed a number of forms that all use the same “rates of pay” (there are 4 categories) for calculating. I was told to expect that a few more forms will be required and these new forms will also be using the same “rates of pay”
    Currently I am using “switch” to insert the “rates of pay” when the user selects a category from a dropdown.
    Is there a way I can update all the forms from an external “table” instead of having to update each form individually?
    Thanks All
    Chomp

    Hi,
    If the form is Reader enabled with Acrobat, then that is going to cut out data connectons.
    You should have a look at John Brinkman's blog: http://blogs.adobe.com/formfeed/2010/07/shared_data_in_packages_part_2.html. Two parts.
    Also there is an example of inter-form communication here, but it may be too clunky: http://assure.ly/qQivbm.
    Good luck,
    Niall

  • Dynamic Select with different number of rows

    Hi all,
    I have a procedure who receives a table name and array of column names of that table.
    I need to create a specific select statement with this parameters. Of course, this could change because the number of column names may differ from each invocation the this procedure.
    Here's my procedure:
    PROCEDURE column_scramble (pv_table_name
    VARCHAR2,
    ptbl_col_names
    tbl_col_names)
    IS
    lv_query
    VARCHAR2 (32000);
    cur_handle   INTEGER;
    temp    
    NUMBER;
    BEGIN
    IF ptbl_col_names.COUNT > 0
    THEN
    lv_query := 'SELECT old.id, ';
    FOR i IN ptbl_col_names.FIRST .. ptbl_col_names.LAST
    LOOP
    lv_query :=
    lv_query
    || 'new.'
    || ptbl_col_names
    || ' as new_'
    || ptbl_col_names (i);
    IF i < ptbl_col_names.LAST
    THEN
    lv_query := lv_query || ',';
    END IF;
    END LOOP;
    lv_query :=
    lv_query
    || ' FROM (  SELECT ROWNUM rr, '
    || pv_table_name
    || '.* FROM '
    || pv_table_name
    || ' ORDER BY '
    || pv_table_name
    || '.id) old, (SELECT ROWNUM rr, a.* FROM (  SELECT id,';
    FOR j IN ptbl_col_names.FIRST .. ptbl_col_names.LAST
    LOOP
    lv_query := lv_query || ptbl_col_names (j);
    IF j < ptbl_col_names.LAST
    THEN
    lv_query := lv_query || ',';
    END IF;
    END LOOP;
    lv_query :=
    lv_query
    || ' FROM '
    || pv_table_name
    || ' ORDER BY DBMS_RANDOM.VALUE) a) new WHERE old.rr = new.rr';
    END IF;
    DBMS_OUTPUT.put_line ('LV_QUERY: ' || lv_query);
    cur_handle := DBMS_SQL.open_cursor;
    DBMS_SQL.parse (cur_handle, lv_query, DBMS_SQL.native);
    temp := DBMS_SQL.execute (cur_handle);
    LOOP
    IF DBMS_SQL.fetch_rows (cur_handle) = 0
    THEN
    EXIT;
    ELSE
    lv_query := 'UPDATE ' || pv_table_name || 'SET ';
    FOR s IN 1 .. ptbl_col_names.COUNT
    LOOP
    lv_query :=
    lv_query
    || ptbl_col_names (s)
    || '='
    || <return_value(s)>;
    IF s < ptbl_col_names.COUNT
    THEN
    lv_query := lv_query || ',';
    END IF;
    END LOOP;
    lv_query := lv_query || ' WHERE id = ' || <return_value_id>;
    END IF;
    END LOOP;
    DBMS_SQL.close_cursor (cur_handle);
    END column_scramble;
    Thanks in advance,
    Filipe

    Avoid using the "cumbersome" DBMS_SQL, try this:
    CREATE OR REPLACE TYPE tbl_col_names IS VARRAY (100) OF VARCHAR2 (40);
    CREATE OR REPLACE PROCEDURE column_scramble
        ( pv_table_name VARCHAR2, ptbl_col_names tbl_col_names
        , pmy_cursor OUT SYS_REFCURSOR)  --<<< NOTE: I added this parameter
    IS
      lv_query     VARCHAR2 (32000);
      cur_handle   INTEGER;
      temp         NUMBER;
    BEGIN
      IF ptbl_col_names.COUNT > 0
      THEN
        lv_query   := 'SELECT old.id, ';
        FOR i IN ptbl_col_names.FIRST .. ptbl_col_names.LAST
        LOOP
          lv_query      := lv_query || 'new.' ||  ptbl_col_names ( i)
                        ||  ' as new_' || ptbl_col_names ( i);
          IF i < ptbl_col_names.LAST
          THEN
            lv_query   := lv_query || ',';
          END IF;
        END LOOP;
        lv_query      := lv_query ||
          ' FROM (  SELECT ROWNUM rr, ' ||  pv_table_name || 
                  '.* FROM ' ||  pv_table_name ||
                   ' ORDER BY ' || pv_table_name ||'.id) old
                 , (SELECT ROWNUM rr, a.* FROM (  SELECT id,';
        FOR j IN ptbl_col_names.FIRST .. ptbl_col_names.LAST
        LOOP
          lv_query   := lv_query || ptbl_col_names ( j);
          IF j < ptbl_col_names.LAST
          THEN
            lv_query   := lv_query || ',';
          END IF;
        END LOOP;
        lv_query      := lv_query || ' FROM ' || pv_table_name ||
                       ' ORDER BY DBMS_RANDOM.VALUE) a) new WHERE old.rr = new.rr';
      END IF;
      DBMS_OUTPUT.put_line ( 'LV_QUERY: ' || lv_query);
      OPEN pmy_cursor FOR lv_query;
    END;
    -- And to execute do this:
    VAR my_cursor REFCURSOR;
    DECLARE
      emp_col   tbl_col_names;
    BEGIN
      emp_col      :=
        tbl_col_names (
                       'DEPTNO'
                     , 'MGR'
                     , 'EMPNO'
                     , 'ENAME'
      column_scramble ( 'EMP3', emp_col, :my_cursor);
    END;
    PRINT my_cursor;
    PL/SQL procedure successfully completed.
            ID NEW_DEPTNO    NEW_MGR  NEW_EMPNO NEW_ENAME
             1         10                  7839 KING     
             2         20       7566       7788 TIGER    
             3         30       7698       7499 ALLEN    
             4         10       7839       7782 CLARK    
             5         20       7566       7502 TIGER    
             6         30       7698       7654 MARTIN   
             7         30       7839       7698 BLAKE    
             8         20       7839       7566 JONES    
             9         20       7566       7788 SCOTT    
            10         20       7788       7876 ADAMS    
            11         30       7698       7521 WARD     
            12         20       7902       7369 SMITH    
            13         30       7698       7844 TURNER   
            14         30       7698       7501 BRWN     
    14 rows selected.

  • Adding Favorites selects only mobil number

    Using iOS 7.0.4 I am trying to add Favorites to the phone app. No matter which phone number I select, the app always saves the MOBILE phone number in Favorites (if there is a mobile phone number associated with the selected contact). How can I save e.g. the WORK PHONE in Favorites?

    You could enter the contact twice, once with the mobile and once with the other number and favourite both

  • URGENT: Selecting only 25 records at a time from a table

    URGENT !!!!
    Hi,
    Im having a RFC which selects records from a table (say table_A) and depending on these selected records, further processing is done within that RFC.
    Now my problem is, this table_A contains around 200 matching records. Due to this entire logical processing consumes lot of time. Hence my RFC is taking huge time to produce result. (apprx 10 mins).
    Can i select these matching records in batch of 25 and display result for these 25 records??
    I'll give this batch size as input to RFC?
    Do anybody have any idea about how to tackle this situation and reduce response time?
    If u hav any better solution than this then pls pls let me know ASAP..
    Regards,
    Amey

    Amey Mogare  ,
                             Do One thing , create  a new importing parameter in your RFC , say current_trans_id. NOw on the first call pass the initial value for current_trans_id.
    then inside the logic .. change the select to
    select upto 25 rows where trnascation id > current_trans_id.
    next time when u call teh rfc.. send the last selected id as a value for current_trans_id.
    i think you can some how use this logic
    Regards
    Sarath

  • Why would an Oracle synonym return a different number of rows to the underlying table?

    Hi, I was doing some queries in EBS to extract data and I realized I was missing a lot of data.
    After investigating I realized:
    select count(*) from apps.XLA_TRANSACTION_ENTITIES;
    35459
    select count(*) from xla.XLA_TRANSACTION_ENTITIES;
    1122337
    The apps.XLA_TRANSACTION_ENTITIES is a synonym for xla.XLA_TRANSACTION_ENTITIES.
    The synonym creation code is:
    CREATE OR REPLACE SYNONYM "APPS"."XLA_TRANSACTION_ENTITIES" FOR "XLA"."XLA_TRANSACTION_ENTITIES";
    I've check and there is a dba_policy applied. The predicate is 1 = 1.
    With this predicate shouldn't all the rows be retrieved? What else can be filtering the rows retrieved in the synonym?
    The database version is: Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
    Thank you,
    Carla

    Carla,
    This is how we find the answer to your question, so maybe this would save you time next time
    - Login to MOS website
    - Search for XLA_TRANSACTION_ENTITIES AND SYNONYM
    - You will see (Why are there differences in SELECT * FROM XLA_TRANSACTION_ENTITIES and SELECT * FROM XLA.XLA_TRANSACTION_ENTITIES ? (Doc ID 946314.1)) second in the list
    Thanks,
    Hussein

  • Find out number of rows of an ALV table

    I would like to implement a generic method that returns the number of lines that are shown in an ALV table. Is this possible? Can I retrieve this information from the ALV model, or do I have to check the context for this?

    Hi Daniel,
    The iwci_salv_wd_table interface (the interface used which implements the method GET_MODEL), also has the method WD_GET_API, which returns a reference to IF_WD_CONTROLLER. This interface implements methods which will return the context information.
    Hope this helps
    Regards,
    Wenonah

  • Oracle database link to MySQL select only one row

    Hello,
    I have created a connection from the Oracle batabase 11.2 to a MySQL database via database link. The following statement shows, that 35 rows are in the mySQL table:
    SQL>  select count(*) from "main_pages"@MOREWEB;
      COUNT(*)
            35
    But a normal select statement only return 1 row.
    SQL> select "subject" from "main_pages"@MOREWEB;
    subject
    Übersicht: Referenzen
    I am using the mysql-connector-odbc-3.51.30-winx64 driver. A newer version cann't be installed because on Windows Server 2008 R2 I get an error with an missing dll-file. The DataDirect-ODBC-driver is not possible, because we like to use the free MySQL-database an DataDirect only support the enterprise edition.
    I also have tried to limit the HS_OPEN_CURSORS or dont limit the HS_FDS_FETCH_ROWS, but there is no difference in the result. I always get only one row.
    HS Init.ora
    # This is a sample agent init file that contains the HS parameters that are
    # needed for the Database Gateway for ODBC
    # HS init parameters
    HS_FDS_CONNECT_INFO = moreweb
    HS_FDS_TRACE_LEVEL = ON
    HS_FDS_FETCH_ROWS=1
    # Environment variables required for the non-Oracle system
    #set <envvar>=<value>
    HS tracefile
    Oracle Corporation --- MITTWOCH   NOV 05 2014 13:56:22.066
    Heterogeneous Agent Release
    11.2.0.1.0
    Oracle Corporation --- MITTWOCH   NOV 05 2014 13:56:22.066
        Version 11.2.0.1.0
    HOSGIP for "HS_FDS_TRACE_LEVEL" returned "ON"
    HOSGIP for "HS_OPEN_CURSORS" returned "50"
    HOSGIP for "HS_FDS_FETCH_ROWS" returned "1"
    HOSGIP for "HS_LONG_PIECE_TRANSFER_SIZE" returned "65536"
    HOSGIP for "HS_NLS_NUMERIC_CHARACTER" returned ".,"
    HOSGIP for "HS_KEEP_REMOTE_COLUMN_SIZE" returned "OFF"
    HOSGIP for "HS_FDS_DELAYED_OPEN" returned "TRUE"
    HOSGIP for "HS_FDS_WORKAROUNDS" returned "0"
    HOSGIP for "HS_FDS_MBCS_TO_GRAPHIC" returned "FALSE"
    HOSGIP for "HS_FDS_GRAPHIC_TO_MBCS" returned "FALSE"
    HOSGIP for "HS_FDS_RECOVERY_ACCOUNT" returned "RECOVER"
    HOSGIP for "HS_FDS_TRANSACTION_LOG" returned "HS_TRANSACTION_LOG"
    HOSGIP for "HS_FDS_TIMESTAMP_MAPPING" returned "DATE"
    HOSGIP for "HS_FDS_DATE_MAPPING" returned "DATE"
    HOSGIP for "HS_FDS_CHARACTER_SEMANTICS" returned "FALSE"
    HOSGIP for "HS_FDS_MAP_NCHAR" returned "TRUE"
    HOSGIP for "HS_FDS_RESULTSET_SUPPORT" returned "FALSE"
    HOSGIP for "HS_FDS_RSET_RETURN_ROWCOUNT" returned "FALSE"
    HOSGIP for "HS_FDS_PROC_IS_FUNC" returned "FALSE"
    HOSGIP for "HS_FDS_REPORT_REAL_AS_DOUBLE" returned "FALSE"
    using mpgw as default value for "HS_FDS_DEFAULT_OWNER"
    HOSGIP for "HS_SQL_HANDLE_STMT_REUSE" returned "FALSE"
    SQL text from hgopars, id=1, len=36 ...
         00: 53454C45 43542043 4F554E54 282A2920  [SELECT COUNT(*) ]
         10: 46524F4D 20606D61 696E5F70 61676573  [FROM `main_pages]
         20: 60204131                             [` A1]
    Deferred open until first fetch.
    Performing delayed open.
    SQL text from hgopars, id=1, len=40 ...
         00: 53454C45 43542041 312E6073 75626A65  [SELECT A1.`subje]
         10: 63746020 46524F4D 20606D61 696E5F70  [ct` FROM `main_p]
         20: 61676573 60204131                    [ages` A1]
    Deferred open until first fetch.
    Performing delayed open.
    Please can help me someone.
    Thanks.
    Bianca

    mxallen wrote:
    Bianca,
    If you log directly into MySQL and issue the same query (select "subject" from "main_pages";) what data is returned?
    I looks to me that you count is the number of rows in the entire table "main_pages"
    while you select is for the data in the "subject" column only.
    This seems to indicate that you have just one row in that subject column.
    Regards,
    Matt
    WHAATT?
    What do you mean by "just one row in that subject column"?
    That makes no sense at all.  A row is a row.  A column is a part of a row.  All rows have all columns, though not all columns of all rows will necessarily have an assigned value.  Lacking a WHERE clause to filter rows, any SELECT should return all rows.

Maybe you are looking for

  • Exporting MPEG2's????

    I am using an uncompressed quicktime graphic within final cut that I have to take into dvd studio pro to create a dvd. When I export an mpeg2 and burn my dvd the graphic seems to look like I have lost Alot of contrast. The quality has been greatly lo

  • Saving PNG files in Ps. Importing background-less files into Pr. What's the deal?

    Recently, sometimes I can save A PNG file in Ps and sometimes I can't. Also, PSD files are not supported in Pr. Without being able to save a PNG, a PSD without a background seems to be my only option... Thoughts? What am I missing

  • Hide a source code of the view

    is there any way (other than creating synonym) to hide a "source code of the view" from the users???? Thanks

  • Officejet 7210n

    I have an officejet 7210 all-in-one printer and the user put new ink cartridge in and keeps getting the error about check the right cartridge. I have taken the cartridge out, cleaned the contacts per the user manual and still get this error. Is there

  • Optical audio out limited to stereo, or is 5.1 possible?

    I've found a lot of clues on this quest for knowledge, but I'm not certain I've put them together correctly. Can the Optical Digital Out jack in the PB G4 17" (1.67GHz) support 5.1-channel output if the media (movie, game) supports it, or is it stric