RDS Query Viewer - Rows Returned Limit

If you run a query within the RDS Query Viewer and the recordset is larger than 50 rows, only the first 50 are displayed. It would be nice to have the option to set the maximum (or have no maximum at all).
I realize there are a variety of database plug-ins and tools as noted on Charlie Arehart's blog. Most of these would get around this cap of 50 rows, but seeing as how we already have some database querying capability within the RDS toolset it would make more sense to just have it all in one place. I even find RDS Query Viewer useful for running other CRUD operations such as UPDATE, DELETE and INSERT.
If for some reason Adobe is feeling the Christmas spirit at this time in the year, then making the recordset grid copy-and-pasteable would be a hot feature to have as well.

Good point, Jose. I'd missed that myself. And I just noticed this limit of only the first 50 was the case for the Adobe Eclipse Extensions for CF8, too.
I guess in that respect I'd say that the fact I'd not noticed it until now in interesting: I've just used the feature to get a sense of what data is typically in a given table and its columns. For that, the first 50 are enough. But sure, if one wanted to browse all the records, being able to skip through would be nice (you could do that in Dreamweaver's RDS-based database viewer, which showed 25 at a time. Interestingly, HomeSite+'s database viewer simply showed all data.)
But sure, it might be nice to see paging through the records in CFBuilder's viewer. I could see how the ability to copy text from the grid can help, too.
And thanks for the mention of my CF411 site, Jose.
/charlie

Similar Messages

  • Cannot get RDS Query Viewer to work

    This appears to be the same or similar problem with RDS Query Viewer that showed up in Ver 2.0.
    Right clicking on a table and selecting RDS Query Viewer gives the following error:
    Resource '/mydir/.rdsTempFiles/RDS Query Viewer does not exist.
    The .rdsTempFiles directory with RDS Query Viewer file are created in mydir. The file is 0 bytes.
    Anyone else seeing this?
    Doug

    Ack, can't edit my message.
    Forgot to say I'm running:
    Windows 7 Home Prof. 32 bit
    Apache Server
    CF 9.01
    CFBuilder 2.0.1beta

  • Flashback Version Query Does Not Return Rows

    I followed the example given in the documentation; http://download-uk.oracle.com/docs/cd/B19306_01/appdev.102/b14251/adfns_flashback.htm#sthref1478
    but even I connect as sys versions BETWEEN query no rows returns, any comments will be welcomed.
    Thank you,
    Best regards.
    Tonguc
    Test scenerio;
    conn hr/hr
    -- drop table flashback_test purge ;
    create table flashback_test ( c1 number, c2 date ) ;
    insert into flashback_test values ( 1, sysdate ) ;
    commit ;
    update flashback_test set c1 = c1 * 2 ;
    commit ;
    update flashback_test set c1 = c1 * 2 ;
    commit ;
    delete flashback_test ;
    commit ;
    conn sys/passwd as sysdba
    SELECT versions_xid xid,
    versions_startscn start_scn,
    versions_endscn end_scn,
    versions_operation operation,
    c1,
    c2
    FROM hr.flashback_test versions BETWEEN TIMESTAMP minvalue AND maxvalue
    ORDER BY versions_starttime;
    SELECT xid, undo_sql
    FROM flashback_transaction_query
    where undo_sql like '%HR%FLASH%' ;
    The results;
    Connected to Oracle Database 10g Express Edition Release 10.2.0.1.0
    Connected as hr
    Table dropped
    Table created
    1 row inserted
    Commit complete
    1 row updated
    Commit complete
    1 row updated
    Commit complete
    1 row deleted
    Commit complete
    Connected to Oracle Database 10g Express Edition Release 10.2.0.1.0
    Connected as SYS
    XID START_SCN END_SCN OPERATION C1 C2
    XID UNDO_SQL
    07002A0003010000 update "HR"."FLASHBACK_TEST" set "C1" = '1' where ROWID = 'AAADiFAAEAAAAiXAAA';
    08000E0027010000 insert into "HR"."FLASHBACK_TEST"("C1","C2") values ('4',TO_DATE('04/01/2007', '
    0900080013010000 delete from "HR"."FLASHBACK_TEST" where ROWID = 'AAADiFAAEAAAAiXAAA';
    0A0006000A010000 update "HR"."FLASHBACK_TEST" set "C1" = '2' where ROWID = 'AAADiFAAEAAAAiXAAA';
    Also tried with Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 the same results..
    Message was edited by:
    TongucY

    Hi Tonguc
    I Think there is something wrong with your configuration. If you want i can share the parameter file with you.
    hr@XE> conn hr/hr
    Connected.
    hr@XE> -- drop table flashback_test purge ;
    hr@XE> create table flashback_test ( c1 number, c2 date ) ;
    Table created.
    hr@XE> insert into flashback_test values ( 1, sysdate ) ;
    1 row created.
    hr@XE> commit ;
    Commit complete.
    hr@XE>
    hr@XE> update flashback_test set c1 = c1 * 2 ;
    1 row updated.
    hr@XE> commit ;
    Commit complete.
    hr@XE>
    hr@XE> update flashback_test set c1 = c1 * 2 ;
    1 row updated.
    hr@XE> commit ;
    Commit complete.
    hr@XE>
    hr@XE> delete flashback_test ;
    1 row deleted.
    hr@XE> commit ;
    Commit complete.
    hr@XE> connect sys/password as sysdba
    Connected.
    sys@XE> SELECT versions_xid xid,
    2 versions_startscn start_scn,
    3 versions_endscn end_scn,
    4 versions_operation operation,
    5 c1,
    6 c2
    7 FROM hr.flashback_test versions BETWEEN TIMESTAMP minvalue AND maxvalue
    8 ORDER BY versions_starttime;
    XID START_SCN END_SCN O C1 C2
    07001F0055010000 1038838 D 4 13/03/2007
    02001D0069010000 1038835 1038838 U 4 13/03/2007
    04001F0039010000 1038832 1038835 U 2 13/03/2007
    1038832 1 13/03/2007
    sys@XE> SELECT xid, undo_sql
    2 FROM flashback_transaction_query
    3 where undo_sql like '%HR%FLASH%' ;
    XID
    UNDO_SQL
    02001D0069010000
    update "HR"."FLASHBACK_TEST" set "C1" = '2' where ROWID = 'AAADskAAEAAAAM2AAA';
    04001F0039010000
    update "HR"."FLASHBACK_TEST" set "C1" = '1' where ROWID = 'AAADskAAEAAAAM2AAA';
    07001F0055010000
    insert into "HR"."FLASHBACK_TEST"("C1","C2") values ('4',TO_DATE('13/03/2007', 'DD/MM/RRRR'));
    08002D0074010000
    delete from "HR"."FLASHBACK_TEST" where ROWID = 'AAADskAAEAAAAM2AAA';
    sys@XE> select version from v$instance;
    VERSION
    10.2.0.1.0
    sys@XE>
    init file
    xe.__db_cache_size=415236096
    xe.__java_pool_size=4194304
    xe.__large_pool_size=12582912
    xe.__shared_pool_size=155189248
    xe.__streams_pool_size=8388608
    *.audit_file_dest='C:\oraclexe\app\oracle\admin\XE\adump'
    *.background_dump_dest='C:\oraclexe\app\oracle\admin\XE\bdump'
    *.compatible='10.2.0.1'
    *.control_files='C:\oraclexe\oradata\XE\control.dbf'
    *.core_dump_dest='C:\oraclexe\app\oracle\admin\XE\cdump'
    *.cpu_count=2
    *.db_block_checking='FALSE'
    *.db_name='XE'
    *.DB_RECOVERY_FILE_DEST_SIZE=10G
    *.DB_RECOVERY_FILE_DEST='C:\oraclexe\app\oracle\flash_recovery_area'
    *.dispatchers='(PROTOCOL=TCP) (SERVICE=XEXDB)'
    *.job_queue_processes=4
    *.open_cursors=300
    *.os_authent_prefix=''
    *.pga_aggregate_target=335544320
    *.remote_login_passwordfile='EXCLUSIVE'
    *.sessions=20
    *.sga_target=570M
    *.shared_servers=4
    *.undo_management='AUTO'
    *.undo_tablespace='UNDO'
    *.user_dump_dest='C:\oraclexe\app\oracle\admin\XE\udump'
    Message was edited by:
    coskan

  • Query Viewer not working

    New install of CFB 2 on Win 7 32bit with CF901.
    When right clicking on a database table in RDS Dataview I get an error , I get the error "/MyProject/.rdsTempFiles/RDS Query Viewer  does not exist". The same is happening when trying to open the RDS Query Viewer.
    This works correctly in CFB 1.
    Any suggestions what is going on? Is it a permissions issue or something similar? The .rdsTempFiles directory is created in the /MyProject folder and shows up in the Navigator.
    Thanks
    Doug

    Hi Kiran,
    I cannot login to the Forums (the login is apparently down) so will answer what I have found.
    Running CFB2 on Win 7 32bit. CFB 1 is also installed.
    Tried the following: ( CFB 2 ALWAYS started with -clean option )
    1. started with no projects at all in Nav. View.
         Added New Project called "test List" that was pointed to "C:\inetpub\wwwroot\testlist" folder - Query Viewer did not work
    2. deleted project from Nav View, deleted .project, .settings., settings.xml, .rdsTempFiles from testlist folder.
         Added New Project called "test List2" that points to same testlist folder. Query Viewer did not work.
         Renamed "test List2" to "testlist". Query Viewer did not work.
    3. Deleted project from Nav View, deleted .project, .settings, settings.xml, .rdsTempFIles from testlist folder.
         Restartd CFB2. Added New project called "testlist" that points to same testlist folder. QUERY Viewer worked successfully.)))
         Renamed testlist project to "Test List". Query Viewer worked.
    Restarted CFB2 and repeated 1 and 2. Even re-started CFB2 after adding a new  project before trying Query Viewer. Did not work.
    Uninstalled CFB2. Reinstalled CFB2. Same results as 1,2,3.
    Other interesting info.
    In the Error Log when I start CFB2, I always get the following.
         Unable to create a template transfer. Com.adobe.rds.core
         Three more entries with No message except "No stack trace" - com.adobe.ide.coldfusion.server
    This happens even after my reinstall.
    Hope this helps.
    Doug Smith
    [email protected]

  • How do you limit the number of rows return from query?

    How do you limit the number of rows return from query? Do all databases support this kind of feature?

    i think the standard is limit
    to get the top 30
    select * from mytable LIMIT 30;returns the first 30 rows
    also if you want a range
    select * from mytable LIMIT 10,30;returns 30 rows starting from 10
    this last one is useful for displaying ranges... something similar happens in these forums when viewing topics and messages

  • How can I limit the number of rows returned by a select stat

    How can I limit the number of rows returned by a select
    statement. I have a query where I return the number of stores
    that are located in a given area.. I only want to return the
    first twenty-five stores. In some instances there may be over
    200 stores in a given location.
    I know is SQL 7 that I can set the pagesize to be 25....
    Anything similiar in Oracle 8i?
    null

    Debbie (guest) wrote:
    : Chad Nale (guest) wrote:
    : : How can I limit the number of rows returned by a select
    : : statement. I have a query where I return the number of
    : stores
    : : that are located in a given area.. I only want to return the
    : : first twenty-five stores. In some instances there may be
    : over
    : : 200 stores in a given location.
    : : I know is SQL 7 that I can set the pagesize to be 25....
    : : Anything similiar in Oracle 8i?
    : If you are in Sql*Plus, you could add the statement
    : WHERE rownum <= 25
    : Used together with an appropriate ORDER BY you
    : could get the first 25 stores.
    Watch out. ROWNUM is run before ORDER BY so this would only
    order the 25 selected
    null

  • Problem with Top N Query when no rows returned (takes forever)

    I have a table with 100 Million rows and I want to get the latest N records using:
    SELECT * FROM
    (SELECT * FROM tablename WHERE columnA= 'ABC' ORDER BY TIME DESC)
    WHERE rownum <= N;
    This works fine and is very fast when there are rows with columnA= 'ABC' but when there are no rows with columnA= 'ABC' the query takes forever.
    The strange things is that the inner query returns immediately when run on it's own when no rows with columnA= 'ABC' exist e.g.
    SELECT * FROM tablename WHERE columnA= 'ABC' ORDER BY TIME DESC
    So why does it take for ever for to run:
    SELECT * FROM (no rows inner query) WHERE rownum <= N;
    I have also tried using:
    SELECT * FROM
    (SELECT columnA, rank() over(ORDER BY TIME DESC) time_rank
    FROM tablename WHERE columnA='ABC')
    WHERE time_rank <= N;
    which returns instantly when there are now rows but takes much longer than the first query when there are rows.

    I cannot see a real difference:With histogram we can see a difference on the elapse when no row returned and into explain plan.
    SQL> drop table tablename
      2  /
    Table dropped.
    Elapsed: 00:00:00.03
    SQL>
    SQL> create table tablename
      2  as
      3  select sysdate - l time
      4         , decode(trunc(dbms_random.value(1,10)),1,'ABC',2,'DEF',3,'GHI',4,'JKL','MNO') as columnA
      5    from (select level l from dual connect by level <= 1000000)
      6  /
    Table created.
    Elapsed: 00:01:19.08
    SQL>
    SQL> select columnA,count(*) from tablename group by columnA
      2  /
    COL   COUNT(*)
    ABC     110806
    DEF     111557
    GHI     111409
    JKL     111030
    MNO     555198
    Elapsed: 00:00:05.05
    SQL>
    SQL> create index i1 on tablename(time)
      2  /
    Index created.
    Elapsed: 00:00:34.08
    SQL>
    SQL> create index i2 on tablename(columna)
      2  /
    Index created.
    Elapsed: 00:00:30.08
    SQL>
    SQL> exec dbms_stats.gather_table_stats(user,'TABLENAME',cascade=>true)
    PL/SQL procedure successfully completed.
    Elapsed: 00:01:18.09
    SQL>
    SQL> set autotrace on explain
    SQL> SELECT * FROM
      2  (SELECT * FROM tablename WHERE columnA= 'ABC' ORDER BY TIME DESC)
      3  WHERE rownum <= 10
      4  /
    TIME     COL
    17/09/06 ABC
    12/09/06 ABC
    08/09/06 ABC
    07/09/06 ABC
    25/08/06 ABC
    22/08/06 ABC
    13/08/06 ABC
    08/07/06 ABC
    14/06/06 ABC
    01/05/06 ABC
    10 rows selected.
    Elapsed: 00:00:01.04
    Execution Plan
       0      SELECT STATEMENT Optimizer=CHOOSE (Cost=2364 Card=10 Bytes=120)
       1    0   COUNT (STOPKEY)
       2    1     VIEW (Cost=2364 Card=200000 Bytes=2400000)
       3    2       SORT (ORDER BY STOPKEY) (Cost=2364 Card=200000 Bytes=2400000)
       4    3         TABLE ACCESS (FULL) OF 'TABLENAME' (Cost=552 Card=200000 Bytes=2400000)
    SQL>
    SQL> SELECT * FROM
      2  (SELECT * FROM tablename WHERE columnA= 'MNO' ORDER BY TIME DESC)
      3  WHERE rownum <= 10
      4  /
    TIME     COL
    20/09/06 MNO
    19/09/06 MNO
    16/09/06 MNO
    14/09/06 MNO
    13/09/06 MNO
    10/09/06 MNO
    06/09/06 MNO
    05/09/06 MNO
    03/09/06 MNO
    02/09/06 MNO
    10 rows selected.
    Elapsed: 00:00:02.04
    Execution Plan
       0      SELECT STATEMENT Optimizer=CHOOSE (Cost=2364 Card=10 Bytes=120)
       1    0   COUNT (STOPKEY)
       2    1     VIEW (Cost=2364 Card=200000 Bytes=2400000)
       3    2       SORT (ORDER BY STOPKEY) (Cost=2364 Card=200000 Bytes=2400000)
       4    3         TABLE ACCESS (FULL) OF 'TABLENAME' (Cost=552 Card=200000 Bytes=2400000)
    SQL>
    SQL> SELECT * FROM
      2  (SELECT * FROM tablename WHERE columnA= 'PQR' ORDER BY TIME DESC)
      3  WHERE rownum <= 10
      4  /
    no rows selected
    Elapsed: 00:00:01.01
    Execution Plan
       0      SELECT STATEMENT Optimizer=CHOOSE (Cost=2364 Card=10 Bytes=120)
       1    0   COUNT (STOPKEY)
       2    1     VIEW (Cost=2364 Card=200000 Bytes=2400000)
       3    2       SORT (ORDER BY STOPKEY) (Cost=2364 Card=200000 Bytes=2400000)
       4    3         TABLE ACCESS (FULL) OF 'TABLENAME' (Cost=552 Card=200000 Bytes=2400000)
    SQL> set autot off
    SQL>
    SQL> EXECUTE DBMS_STATS.GATHER_TABLE_STATS(user,'TABLENAME',METHOD_OPT => 'FOR COLUMNS SIZE 250 columna')
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:09.08
    SQL>
    SQL> set autotrace on explain
    SQL> SELECT * FROM
      2  (SELECT * FROM tablename WHERE columnA= 'ABC' ORDER BY TIME DESC)
      3  WHERE rownum <= 10
      4  /
    TIME     COL
    17/09/06 ABC
    12/09/06 ABC
    08/09/06 ABC
    07/09/06 ABC
    25/08/06 ABC
    22/08/06 ABC
    13/08/06 ABC
    08/07/06 ABC
    14/06/06 ABC
    01/05/06 ABC
    10 rows selected.
    Elapsed: 00:00:01.03
    Execution Plan
       0      SELECT STATEMENT Optimizer=CHOOSE (Cost=1434 Card=10 Bytes=120)
       1    0   COUNT (STOPKEY)
       2    1     VIEW (Cost=1434 Card=110806 Bytes=1329672)
       3    2       SORT (ORDER BY STOPKEY) (Cost=1434 Card=110806 Bytes=1329672)
       4    3         TABLE ACCESS (FULL) OF 'TABLENAME' (Cost=552 Card=110806 Bytes=1329672)
    SQL>
    SQL> SELECT * FROM
      2  (SELECT * FROM tablename WHERE columnA= 'MNO' ORDER BY TIME DESC)
      3  WHERE rownum <= 10
      4  /
    TIME     COL
    20/09/06 MNO
    19/09/06 MNO
    16/09/06 MNO
    14/09/06 MNO
    13/09/06 MNO
    10/09/06 MNO
    06/09/06 MNO
    05/09/06 MNO
    03/09/06 MNO
    02/09/06 MNO
    10 rows selected.
    Elapsed: 00:00:02.05
    Execution Plan
       0      SELECT STATEMENT Optimizer=CHOOSE (Cost=6219 Card=10 Bytes=120)
       1    0   COUNT (STOPKEY)
       2    1     VIEW (Cost=6219 Card=555198 Bytes=6662376)
       3    2       SORT (ORDER BY STOPKEY) (Cost=6219 Card=555198 Bytes=6662376)
       4    3         TABLE ACCESS (FULL) OF 'TABLENAME' (Cost=552 Card=555198 Bytes=6662376)
    SQL>
    SQL> SELECT * FROM
      2  (SELECT * FROM tablename WHERE columnA= 'STU' ORDER BY TIME DESC)
      3  WHERE rownum <= 10
      4  /
    no rows selected
    Elapsed: 00:00:00.00
    Execution Plan
       0      SELECT STATEMENT Optimizer=CHOOSE (Cost=6 Card=1 Bytes=12)
       1    0   COUNT (STOPKEY)
       2    1     VIEW (Cost=6 Card=1 Bytes=12)
    3 2 SORT (ORDER BY STOPKEY) (Cost=6 Card=1 Bytes=12)
    4 3 TABLE ACCESS (BY INDEX ROWID) OF 'TABLENAME' (Cost=5 Card=1 Bytes=12)
    5 4 INDEX (RANGE SCAN) OF 'I2' (NON-UNIQUE) (Cost=4 Card=1)
    SQL> Nicolas.

  • No rows returned in the BIS views

    I am new to Discoverer. I had connected to Financials Intelligence responsibility using discoverer desktop. When I tried to create a workbook in General Ledger Business Area to display the GL accounts, I get no rows returned message. I get the same message for any kind of report I try to create not only in GL business area but also in any of the seeded business areas provided by the Oracle. I can query it in toad and see the data but it is not retrieved in discoverer. what could be the problem? is there any profile options to be setup for my username or am I missing something?
    Any help is greatly appreciated
    Thanks

    Here's the metalink note for those interested.
    It's basically laying out all the steps to setup the info in Oracle Apps as alluded to by Simon and then perform a complete refresh of the BIS views in the database, bring in the new .eex file for changes, etc.
    Russ
    ===========================================================
    Applies to: Oracle Discoverer - Version: 10.1.2.48.18
    This problem can occur on any platform.
    Oracle Applications 11.5.10.2
    Oracle Applications Concurrent Manager SymptomsUnable to retrieve any data on standard General Ledger (GL) business areas and standard workbooks after migrating the EUL from Discoverer 4.1 to 10.1.2 and upgrading Oracle Applications to 11.5.10.2.
    These same workbooks and business areas worked fine before the upgrade to Discoverer 10.1.2.
    A custom business area and custom workbooks return data, but none of the standard pre-seeded "BIS" or "Financials Intelligence General Ledger (GL) business areas return data when testing in Discoverer Plus, Viewer or Desktop.
    ChangesMigrated the Discoverer EUL and Oracle Application Server environment from Discoverer 4.1.48.08 to 10.1.2.48.18. CauseIncomplete setup of Oracle E-Business Suite and Discoverer environment for Business Intelligence (BIS) and/or Financials Intelligence, including missing profile options for Oracle Applications Administrator and custom Super User responsibility.
    SolutionTo implement the solution, please execute the following steps:
    1. Login to Oracle Applications Systems Administration function as SYSADMIN user and set the profile option as described below:
    a. Profile > System
    b. Check the 'Site', 'Responsibility' and 'Profiles with No Values' checkboxes
    c. Enter "Applications Administration' in 'Responsibility' field
    d. Enter FII: GL BIS Discoverer access (if it does not display the profile option, please try wildcard option "FII%GL%BIS%" )
    e. Then in the next screen, select 'Yes' from LOV under 'Site' and 'Responsibility' column
    f. Save the settings
    g. Again repeat the same steps for custom responsibility "My_Company General Ledger Super User"
    2. Complete/confirm the following steps from Note 313418.1, Section 6, Post Installation Tasks
    a) Step 4. Regenerate your Business Views - done throughNote 313418.1, Section 6, Post Installation Tasks
    a) Step 4. Regenerate your Business Views - done through Oracle Applications Concurrent Manager as SYSADMIN user with the "Business Views Setup" responsibility.
    b) Recommend all steps under 4 and steps under 5
    c) Step 8. Refresh the Discoverer 10.1.2 End User Layer - via SYSADMIN user/responsibility - as described in note
    d) Step 9 -> Need to make sure Applications Administrator responsibility has all
    security and access to the EUL and business areas. Be sure to grant to responsibility
    rather than SYSADMIN user since the "Applications Administrator" responsibility is used to perform Discoverer Administration tasks.
    $ORACLE_HOME/bin/eulapi \
    -CONNECT <EUL schema>/<password>@<db> \
    -GRANT_PRIVILEGE \
    -ROLE "Applications Administrator" \
    -PRIVILEGE all_admin_privs
    $ORACLE_HOME/bin/eulapi \
    -CONNECT <EUL schema>/<password>@<db> \
    -GRANT_PRIVILEGE \
    -ROLE "Applications Administrator" \
    -PRIVILEGE all_user_privs
    AND
    $ORACLE_HOME/bin/eulapi \
    -CONNECT <EUL schema>/<password>@<db> \
    -GRANT_PRIVILEGE \
    - ROLE "Applications Administrator" \
    -BUSINESS_AREA_ADMIN_ACCESS % \
    -WILDCARD \
    -LOG <log file name>
    Note: The above commands need to be in one continuous line. For Unix/Linux, you may separate lines with continuation character "\"
    3. Once all steps have been completed, the standard General Ledger (GL) workbooks and newly created workbooks based on standard GL usiness areas will return data.
    Note: If you are unsure if you are encountering this specific issue, it is always beneficial to test the data via SQL using the same Oracle E-Business Suite user and responsibility.
    The following reference will guide you how to accomplish this:
    Note 279736.1 'How To Run SQL From An Apps Mode Discoverer Workbook In SQL*PLUS'
    ReferencesNote 313418.1 - Using Discoverer 10.1.2 with Oracle E-Business Suite 11i
    Note 279736.1 - How To Run SQL From An Apps Mode Discoverer Workbook In SQL*PLUS
    Keywords'BUSINESS~AREA' 'PROFILES-SYSTEM' 'FII~~GL~BIS~DISCOVERER~ACCESS' 'DISCOVERER~4.1.48.08' 'BUSINESS~VIEWS' 'UPGRADE~TO~11.5.10.2' 'PROFILES-SYSTEM' 'UPGRADE~TO~10.1.2'
    --------------------------------------------------------------------------------

  • Need to know how to limit the number of rows returned on Oracle

    MS SQL Server has a command called 'set row count'.
    We are trying to find similar one on Oracle.
    What we are trying to do is that instead of using rownum in the query statement, we would like to find way to limit the number of rows returned. I understand that we can use JDBC resultSet object, but that's not what we want.
    I know Oracle has one called arraysize, but this would not limit the number of rows returned either.
    Pease help.
    Thanks

    I understand that we can use JDBC resultSet object, but that's not what we want.I'm not sure which feature of ResultSet you use and which not.
    But if this question has anything to do with JDBC (that's the forum where you put it), I'd recommend to use Statement.setMaxRows(). This will limit the count of rows which your statement will fetch into it's ResultSet.

  • XMLTable - 65535 limit on rows returned

    Hi,
    I've come across a problem with the Oracle XMLTable command as follows:
    - I have an XML doc (approx 30Mb) which contains 79k entries
    - I have this referenced in Oracle as a BFile
    - If I count the number of rows returned by the XMLTable command it does not equal 79k - instead the number is 79k - 65535
    Is there a limit on the number of rows XMLTable can handle (ie. < 2 ^ 16) or am I missing something?
    declare
    xbfile BFILE;
    res BOOLEAN;
    countrows number;
    begin
    xbfile := bfilename('XML_DIR', 'test.xml');
    res := DBMS_XDB.createResource('/public/test.xml', xbfile);
    select count(*) into countrows from XMLTable('for $i in doc("/public/test.xml") return $i/ROWSET/ROW'
    columns ID INTEGER);
    dbms_output.put_line('count=' || countrows);
    end;

    SQL> select * from v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
    PL/SQL Release 11.1.0.6.0 - Production
    CORE    11.1.0.6.0      Production
    TNS for 32-bit Windows: Version 11.1.0.6.0 - Production
    NLSRTL Version 11.1.0.6.0 - Production
    5 rows selected.
    SQL> set autotrace on
    SQL> select count(*)                                                                                       
      2  from xmltable( '$d/ROWSET/ROW'                                                                   
      3               passing xmltype( cursor( select rownum from dual connect by level <= 70000 ) ) as "d"
      4               columns rnum integer path 'ROWNUM'                                                  
      5               )                                                                                   
      6  /            
    COUNT(*)
        70000
    1 row selected.
    Execution Plan
    Plan hash value: 1051571446
    | Id  | Operation                            | Name                   | Rows  | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT                     |                        |     1 |    29   (0)| 00:00:01 |
    |   1 |  SORT AGGREGATE                      |                        |     1 |            |          |
    |   2 |   VIEW                               |                        |  8168 |    29   (0)| 00:00:01 |
    |   3 |    VIEW                              |                        |  8168 |    29   (0)| 00:00:01 |
    |   4 |     COLLECTION ITERATOR PICKLER FETCH| XMLSEQUENCEFROMXMLTYPE |       |            |          |
    Statistics
          70005  recursive calls
         148263  db block gets
          30391  consistent gets
              0  physical reads
              0  redo size
            411  bytes sent via SQL*Net to client
            385  bytes received via SQL*Net from client
              2  SQL*Net roundtrips to/from client
              1  sorts (memory)
              0  sorts (disk)
              1  rows processed

  • Query rows returned VS csv rows downloaded

    Does anyone know whether it's possible to have the rows returned by the query to the default of 500 but the actuall rows downloaded in the .csv file to be all the rows that would have been returned from the query? (otherwise the performance of the query is too slow if you try and get the limit of 10,000 rows)
    Thanks
    Alice

    Alice,
    You can define the number of rows on a page (using number of rows) and the total number of rows retrieved from your query (using max row count). The total number is what’s returned when you export your report as a CSV file. And if you’re page renders too slowly when you set the total number of rows to 10000, you could try using the simple pagination style “Row Ranges X to Y”. With this pagination style, the report would only process your result set up to the max row shown on the current page.
    Regards,
    Marc

  • Why does view WWSBR_USER_FOLDERS return no rows to public ?

    Hi,
    I want to show a user dependent list of folders in a portal
    report application component, but the view
    portal30.wwsbr_user_folders does not show public folders to a
    public (not logged in) user. The view does not return any rows. I
    tested this by creating a portal report on the view, put the
    report as a portlet on page. Logout and navigate to the page. The
    report portlet shows "No Rows Returned". I would expect to see
    the public folders in the report portlet. Am I doing something
    wrong ? Is view portal30.wwsbr_user_folders the right view for
    this kind of query ?
    Environment:
    9iAS version 1.0.2.2
    Portal patch 3.0.9.8.1
    RDBMS version 8.1.7.1.1
    regards,
    Willem-Pieter van der Lugt
    Oracle Consulting NL.

    This is a bug. As a workaround, create two new views as follows:
    create or replace view wwsbr_user_corners2 as
    SELECT "ID","SITEID","LANGUAGE","PARENTID","NAME","TITLE","SETTIN
    GSSETID","SETTINGSSETSITEID",
    "ISPUBLIC","IMAGE","ROLLOVERIMAGE","TITLEIMAGE","LEADER","DESCRIP
    TION",
    "PRODUCTION","FRONTPAGE","CREATEDATE","CREATOR","UPDATEDATE","UPD
    ATOR","SEQ",
    "PUBLISHDATE","DISPLAYLEVEL","DISPLAYSUBCORNERS","ICON","LIFETIME
    HITS","CTXTXT",
    "NAVIGATIONCORNERID","ISTEMPLATE","ISPROJECT","HAVEITEMSECURITY",
    "ITEMVERSIONING",
    "DISPLAYINPARENT","TOPICID","TOPIC_SITEID","VALUE","NAVBARSITEID"
    ,"TYPE","TYPE_SITEID",
    "BASE_TYPE","FOLDER_PATH_DISPLAY","MAILTO_LINK_DISPLAY","IS_CACHE
    _VALID",
    "IS_PORTLET","IS_CACHING_ON","QUOTA","TYPE_DISPLAY_FULL","SITECHA
    RID","SYSPRIV_NAME",
    "PLSQL_EXECUTOR","SUBSCRIBER_ID"
    FROM WWV_CORNERS C
    WHERE
    -- Next line needed to select public folders
    ISPUBLIC = 1
    -- portal admin
    OR EXISTS
    SELECT 'x'
    FROM WWSEC_SYS_PRIV$
    WHERE OBJECT_TYPE_NAME = 'ANY_SITE'
    AND NAME = 'ALL_OBJECTS'
    AND OWNER = wwctx_api.get_product_schema
    AND GRANTEE_TYPE = 'USER'
    AND GRANTEE_USER_ID = wwctx_api.get_user_id
    AND GRANTEE_GROUP_ID = 0
    AND PRIVILEGE_CODE = 500 -- ADMIN
    UNION ALL
    SELECT 'x'
    FROM WWSEC_SYS_PRIV$ P, WWSEC_FLAT$ F
    WHERE P.OBJECT_TYPE_NAME = 'ANY_SITE'
    AND P.NAME = 'ALL_OBJECTS'
    AND P.OWNER = wwctx_api.get_product_schema
    AND P.GRANTEE_TYPE = 'GROUP'
    AND P.GRANTEE_USER_ID = 0
    AND P.GRANTEE_GROUP_ID = F.GROUP_ID
    AND P.PRIVILEGE_CODE = 500 -- ADMIN
    AND F.PERSON_ID = wwctx_api.get_user_id
    -- site admin
    OR EXISTS
    SELECT 'x'
    FROM WWSEC_SYS_PRIV$
    WHERE OBJECT_TYPE_NAME = 'SITE'
    AND NAME = C.SITECHARID
    AND OWNER = wwctx_api.get_product_schema
    AND GRANTEE_TYPE = 'USER'
    AND GRANTEE_USER_ID = wwctx_api.get_user_id
    AND GRANTEE_GROUP_ID = 0
    AND PRIVILEGE_CODE = 300 -- ADMIN
    UNION ALL
    SELECT 'x'
    FROM WWSEC_SYS_PRIV$ P, WWSEC_FLAT$ F
    WHERE P.OBJECT_TYPE_NAME = 'SITE'
    AND P.NAME = C.SITECHARID
    AND P.OWNER = wwctx_api.get_product_schema
    AND P.GRANTEE_TYPE = 'GROUP'
    AND P.GRANTEE_USER_ID = 0
    AND P.GRANTEE_GROUP_ID = F.GROUP_ID
    AND P.PRIVILEGE_CODE = 300 -- ADMIN
    AND F.PERSON_ID = wwctx_api.get_user_id
    -- owned; check the special groups too
    OR EXISTS
    SELECT 'x'
    FROM WWSEC_SYS_PRIV$
    WHERE OBJECT_TYPE_NAME = 'FOLDER'
    AND NAME = C.SYSPRIV_NAME
    AND OWNER = wwctx_api.get_product_schema
    AND GRANTEE_TYPE = 'USER'
    AND GRANTEE_USER_ID in (wwctx_api.get_user_id, 2)
    AND GRANTEE_GROUP_ID = 0
    AND PRIVILEGE_CODE = 700
    OR EXISTS -- group grant to a specific group
    SELECT 'x'
    FROM WWSEC_SYS_PRIV$ P, WWSEC_FLAT$ F
    WHERE P.OBJECT_TYPE_NAME = 'FOLDER'
    AND P.NAME = C.SYSPRIV_NAME
    AND P.OWNER = wwctx_api.get_product_schema
    AND P.GRANTEE_TYPE = 'GROUP'
    AND P.GRANTEE_USER_ID = 0
    AND P.GRANTEE_GROUP_ID = F.GROUP_ID
    AND F.PERSON_ID = wwctx_api.get_user_id
    AND PRIVILEGE_CODE = 700
    create or replace view wwsbr_user_folders2 as
    SELECT c.id,
    c.siteid caid,
    c.language language,
    c.name name,
    c.title display_name,
    c.topicid category_id,
    c.topic_siteid category_caid,
    c.description ,
    c.type type_id,
    c.type_siteid type_caid,
    c.base_type base_type_id,
    c.is_portlet is_portlet,
    c.is_caching_on is_caching_on,
    c.seq sub_folder_sequence,
    c.displayinparent display_in_parent_folder,
    c.itemversioning,
    c.settingssetid style_id,
    c.settingssetsiteid style_caid,
    u.url url_value,
    decode(c.base_type,3,c.value,null) search_value,
    decode(c.base_type,4,c.value,null) plsql_value,
    c.image title_image_name,
    c.rolloverimage rollover_image_name,
    c.titleimage banner_image_name ,
    c.navigationcornerid navigation_bar_id,
    c.navbarsiteid navigation_bar_caid,
    c.ispublic is_public,
    c.haveitemsecurity item_level_security,
    c.type_display_full display_full_screen,
    c.plsql_executor plsql_folder_executor,
    c.createdate,
    c.creator,
    c.updatedate,
    c.updator
    FROM WWSBR_USER_CORNERS2 C,
    WWSBR_URL$ U
    WHERE c.value = u.url(+) and
    c.siteid = u.object_siteid(+)
    The first view adds the condition (WHERE ISPUBLIC=1) to show any
    public folder.
    Don't change the original view definitions, and be sure you
    grant access on WWSBR_USER_FOLDERS2 (or whatever you choose to
    call it) to PORTAL30_PUBLIC (or whatever your public portal
    schema is called).
    Regards,
    Jerry

  • Querying view gives multiple rows

    I have a query that returns duplicate rows (5) when I write the query this way:
    "Select *
    from view v
    , table_A a
    where v.key = a.key"
    However, if I write the query this way, the correct data is returned, i.e., only one row.
    "Select *
    from (select * from view v)
    ,table_A a
    where v.key = a.key"
    It also works correctly if I put the in-line view in the select portion of the select statement.
    Any ideas?
    Thank you for your help,
    Tricia

    With the second query, I get "ORA-00904: "V"."KEY": invalid identifier". Are you sure that it ran ok for you? v.key is out of scope in the where clause...
    If I label the subselect as v, I get the same result as the first query - 5 rows.
    Message was edited by:
    Boneist
    (I can't spell)

  • How to get number of rows return in SELECT query

    i'm very new in java, i have a question:
    - How to get number of rows return in SELECT query?
    (i use SQL Server 2000 Driver for JDBC and everything are done, i only want to know problems above)
    Thanks.

    make the result set scroll insensitve, do rs.last(), get the row num, and call rs.beforeFirst(), then you can process the result set like you currently do.
             String sql = "select * from testing";
             PreparedStatement ps =
              con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
             ResultSet rs = ps.executeQuery();
             rs.last();
             System.out.println("Row count = " + rs.getRow());
             rs.beforeFirst();~Tim
    NOTE: Ugly, but does the trick.

  • How to restrict number of rows returned in a query

    Hi frnds,
    I'd like to restrict number of rows returned by my query to some 10 rows. how to do that.When I try doing with the rownum<10 its giving results for a particular dept and that too some 6 rows only...btw I'm grouping my table and includes joins from many a table and am ordering the table results by a column.. How to do this..

    776317 wrote:
    Hi frnds,
    I'd like to restrict number of rows returned by my query to some 10 rows. how to do that.When I try doing with the rownum<10 its giving results for a particular dept and that too some 6 rows only...btw I'm grouping my table and includes joins from many a table and am ordering the table results by a column.. How to do this..
    TELL ME HOW MANY ROWS YOU HAVE IN TABLE?
    Because you have only *6 rows* in you column, if you less than 10 rows then it displays only containied/exist rows. nothing much
    select ename,empno from emp where rownum < 10;Thanks

Maybe you are looking for