Enhancement: Using PL/SQL in User reports

I'ld like to have the following statement as a User report :
declare
  objlist sys.dbms_stats.objecttab;     
begin
   sys.dbms_stats.gather_database_stats( cascade    => TRUE,options    => 'LIST STALE',objlist    => objlist);
   for i in 1 .. objlist.count LOOP
      dbms_output.put_line(ObjLIst(i).OwnName||'.'||ObjList(i).ObjName||'[ '||ObjLIst(i).PartName||' ]');
   END LOOP;
END;
/but when I test it, there is errors ORA-06550 and PLS-00103.
It look like that UserReports only accept SQL statements....

At this time, User Defined Reports only accept SQL but I will enter an enhancement request for our next version (post production).
-- Sharon

Similar Messages

  • How to use advanced tab in user reports?

    Hi,
    How to use "advanced" tab in user reports?
    I have two reports. I fill "Report ID" in both and then I can push "Add Report" and fill fields property.
    Then I'm can "drill" from one report to another on right click, but how to pass parameters?
    Is it even possible?
    Regard
    Libor

    Thank you for reply.
    I can't get it working.
    I have two reports:
    1. report:
    Name: test
    SQL: select 1 NUM, 'text' TEXT from dual;
    On advanced tab:
    ReportID: -null-
    Name: test2
    Report: Test2
    2. report
    Name: test2
    SQL: select :NUM from dual;
    Now, when I run the first report and click do right click on a row and select TEST2
    from popup menu, it navigates to the second report test2, but WITHOUT actual value
    from NUM column from first report.
    I'm using latest version of SQL Developer (1.1.1.25) and I like reports.
    With this feature it would be even better.
    Regards
    Libor

  • Can we use Dynamic SQL in Oracle Reports ?

    Hi ,
    Can we use Dynamic SQL in Oracle Reports ?
    If yes please give some examples .
    Thanx
    srini

    I believe the built-in package SRW.Do_Sql is what you are looking for
    Example from the document:
    /* Suppose you want to create a "table of contents" by getting the
    ** first character of a columns value, and page number on which its
    ** field fires to print. Assume that you want to put the "table of
    contents"
    ** into a table named SHIP. You could write the following construct:
    DECLARE
    PAGE_NO NUMBER;
    PAGE_FOR INDEX NUMBER;
    SORT_CHAR CHAR(1);
    CMD_LINE CHAR(200);
    BEGIN
    SORT_CHAR := :SORT_NAME ;
    IF :CALLED = Y THEN
         SRW.GET_PAGE_NUM(PAGE_FOR_INDEX);
         SRW.USER_EXIT(RWECOP PAGE_FOR_INDEX
         P_START_PAGENO);
         SRW.MESSAGE(2,TO_CHAR(:P_START_PAGENO));
    END IF;
    SRW.GET_PAGE_NUM(PAGE_NO);
    CMD_LINE := INSERT INTO SHIP VALUES
                          (||SORT_CHAR||,||TO_CHAR(PAGE_NO)||);
    SRW.MESSAGE(2,CMD_LINE);
    SRW.DO_SQL(CMD_LINE);
    COMMIT;
    EXCEPTION
      WHEN DUP_VAL_ON_INDEX THEN
            NULL;
      WHEN SRW.DO_SQL_FAILURE THEN
            SRW.MESSAGE(1,FAILED TO INSERT ROW INTO SHIP TABLE);
      WHEN OTHERS THEN
           COMMIT;
    END;

  • Unable to use custom SQL query in report

    Hi all,
    I am newbie to OBIEE
    I try to write a customized sql in one of the report in OBIEE answers.
    No error is thrown when I click on "Set SQL" button.
    But, when I try to click on "Result" tab, I get the below error message,
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 14026] Unable to navigate requested expression: count(AS_SALES_LEADS.STATUS_CODE by [ ] ). Please fix the metadata consistency warnings. (HY000)
    The same query I try running in Toad and it is not throwing any error, but running successfuly.
    Kindly help me on this.
    Regards,
    Shivakumar A

    Thank you very much for your time.
    Below is the query I used,
    SELECT saw_0."1", saw_0."2", saw_0."3"
    FROM (SELECT COUNT (c.status_code) "1", COUNT (a.status) "2",
    COUNT (c.accept_flag) "3"
    FROM table1 c,
    table2 g,
    table3 f,
    as_leads a
    WHERE f.sales_group_id = g.sales_group_id
    AND a.lead_id = c.sales_lead_id
    AND a.customer_id = f.customer_id) saw_0
    Result I get when run in Toad,
    Col1 Col2 Col3
    1234 43534 6787
    But, the same when I put in advanced sql tab, I get the below error message,
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 14026] Unable to navigate requested expression: count(AS_SALES_LEADS.STATUS_CODE by [ ] ). Please fix the metadata consistency warnings. (HY000)
    Please do help me on this.
    Hope the above information is enough for getting an idea what I am stuck up with.
    Edited by: 961805 on 17 Oct, 2012 3:56 AM

  • Using PL/SQL in OMS Reports

    I've written a pl/sql block report and I'd like to add it to the OMS reports.
    Are there any examples or hints on how to do this ?
    Thanks

    Cloned canned report Oracle Database Configuration Summary.
    Removed all input constraints from query so it reads as follows:
    begin
    declare
    type cursor_type IS REF CURSOR;
    result_cursor_out CURSOR_TYPE;
    tgt_guid_in MGMT_IP_TGT_GUID_ARRAY;
    start_date_in DATE DEFAULT NULL;
    end_date_in DATE DEFAULT NULL;
    query_string VARCHAR(6000);
    begin
    result_cursor_out := ?;
    tgt_guid_in := ?;
    start_date_in := ?;
    end_date_in := ?;
    query_string :=
    'select o.database_name "DATABASE_NAME",
    o.characterset "CHARACTERSET",
    o.instance_name "INSTANCE_NAME",
    o.national_characterset "NATIONAL_CHARACTERSET",
    o.global_name "GLOBAL_NAME",
    o.log_mode "LOG_MODE",
    o.banner "BANNER",
    o.default_temp_tablespace "DEFAULT_TEMP_TABLESPACE"
    from mgmt$db_dbninstanceinfo o ';
    open result_cursor_out for query_string ;
    end;
    end;
    Original report allows target selection from a list of databases, I changed to a blank specific target, since I want an unrestricted listing.
    When I try to run, I get this error:
    Error rendering element. Exception: Closed Statement
    I've tried various ways to get around the error to no avail.
    What did I do incorrectly ?
    Thanks

  • PL/SQL in user defined reports

    Is it possible to use PL/SQL in user defined reports? As far as I know, it isn't, but...
    And one more question: can we do something like this in user defined reports:
    ' select * from :TABLE '
    where
    :TABLE is a bind variable?
    Thanks in advance
    Aliq

    I want to create a parent-child report, which in simply version does three things:
    parent
    1. takes all the table names from user_tables
    2. for each table_name (taken from user_tables) it takes a few rows from this table (selet A,B,C from table_name).
    child
    3. for each table name (from master) gives additional information from this table (select D,E,F from table_name)
    And I wonder if it's possible.

  • PL/SQL Ad-hoc Reporting Implementation Questions

    Recently, I have been put on a development team that is developing a small reporting module for one of our applications.
    I'm trying to mask the underlying structure from the application by having the application run PL/SQL procedures which return REF CURSORS to the client with the requested data. Right now I'm struggling with how to implement the PL/SQL in the best fashion.
    Since this is a reporting tool the user has many combinations of selections. For example at a high level this application has a combination of multiple dropdowns (4-6), radio buttons, and check boxes. As you can see this results in a high amount of possible combinations that have to be sent to the database.
    Basically, the user chooses the following:
    1. Columns to receive (ie different SELECT lists in the PL/SQL)
    2. Specific conditions (ie different WHERE clauses in the PL/SQL)
    3. Aggregate functions (SUMS, TOTALS, AVERAGES based on #1 and #2)
    4. Trends based on #3.
    So... with that said I see two possibilities:
    1. Create a static query for each combination of parameters (in this case that would most likely result in at least 300 queries that would have to be written, possibly 600+).
    The problem I see with this is that I will have to write a significant amount of queries. This is a lot of front end work that, while is tedious, could result in a better performing system because it would be a parse once, execute many scenario which is scalable.
    The downside though is that if any of the underlying structure changes I have to go through and change tens of queries.
    2. Use DBMS_SQL and dynamically generate the queries based on input conditions.
    This approach (possibly) sacrifices performance (parse once, execute once situation), but has increased maintainability because it is more likely that I'll have to make one change vice a number of changes in scenario 1.
    A downside to this is that, it may be harder to debug (and hence maintain) because the SQL is generated on the fly.
    My questions to all is:
    1. Which is the approach that would best manage maintainability / performance?
    2. Is there any other approaches to using PL/SQL as a reporting tool that I am not thinking of?
    The database is 10.2.0.3, and the 'application' is PHP 5.1 running on IIS 6.
    If you need me to provide any additional information please let me know.
    Thanks!

    Ref cursors are an ugly solution (different though in 11g).
    You build a dynamic SQL. It must/should have bind variables. But a ref cursor does not allow you to dynamically bind values to bind variables. You need to code the actual bind variables into the code as part of the open cursor command. And at coding time you have no idea how many bind variables there will be in that dynamic SQL for the ref cursor.
    The proper solution is DBMS_SQL as it allows exactly this. Also one of the reasons why APEX uses this for its report queries.
    The only sensible way to implement this type of thing in PL/SQL is by not trying to make it generic (as one could with DBMS_SQL). Instead use polymorphisms and have each procedure construct the appropriate ref cursor with bind variables.
    E.g.
    SQL> create or replace package query as
    2 procedure Emp( c in out sys_refcursor );
    3 procedure Emp( c in out sys_refcursor, nameLike varchar2 );
    4 procedure EMp( c in out sys_refcursor, deptID number );
    5 end;
    6 /
    Package created.
    SQL>
    SQL> create or replace package body query as
    2
    3 procedure Emp( c in out sys_refcursor ) is
    4 begin
    5 open c for select * from emp order by 1;
    6 end;
    7
    8 procedure Emp( c in out sys_refcursor, nameLike varchar2 ) is
    9 begin
    10 open c for select * from emp where ename like nameLike order by 1;
    11 end;
    12
    13 procedure EMp( c in out sys_refcursor, deptID number ) is
    14 begin
    15 open c for select * from emp where deptno = deptID order by sal;
    16 end;
    17 end;
    18 /
    Package body created.
    SQL>
    SQL> var c refcursor
    SQL> exec query.Emp( :c, 'S%' )
    PL/SQL procedure successfully completed.
    SQL>
    SQL> print c
    EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
    7369 SMITH CLERK 7902 1980-12-17 00:00:00 800 20
    7788 SCOTT ANALYST 7566 1987-04-19 00:00:00 3000 20
    SQL>

  • Parameterized Views for User Reports

    I would like to be able to define a view such as:
    create view dept_emps(p_dept in varchar2) as
    select * from emps where dept = p_dept);
    and use this view to define a SQL Dev drilldown report with SQL such as:
    select * from dept_emps(:DEPT)
    where :DEPT is a bind variable passed from a selected depts report row.
    Oracle apparently does not support parameterized view definitions as suggested above, but I have found an article by Tom Kyte on the issue of parameterizing views, where Tom suggests using DBMS_SESSION.SET_CONTEXT (called within a user package) to set context values that can be retrieved in a view using the SYS_CONTEXT function. I can get this approach to work at the SQL prompt to work around the lack of formal view parameters. I have a package which defines a procedure which sets context values that I can then retrieve within a view using the SYS_CONTEXT function.
    To use this approach when defining a SQL Developer user report, the SQL for the report would need to be logically something like (which works fine at an SQL prompt):
    exec ssuper_context.set_ctx('DEPT', :DEPT) - - Call user procedure to assign context variable 'DEPT' with bind value from parent report
    select * from dept_emps
    where view dept_emps uses function SYS_CONTEXT to return the value for context variable 'DEPT'.
    SQL Developer complains about this as the SQL for a user-defined report. Can anyone suggest how I might pass a bind value from a selected parent record to a view which implements a drilldown report?
    TIA Jon

    I met CSI at a kongress a few weeks ago and pressed them a bit on how this works. Eventually they fezzed up about the table read but mentioned that in the next release being developed it would be different...
    Problems with this is that the FM has a couple of limitations, so you cannot read all tables correctly... so you end up reading some of the wrong ones or taking the easy ones.
    Another option is to let the database itself do the hard work, to get back to the performance aspect.
    Anyway, for neither of these two do you need any tcode, so indeed we are drifting off topic...

  • Confused by user reports - childs/detail

    SQL Dev user reports are very powerful and I like them very much. I am a little bit worried that I am not able to explore and employ all user report features. I found the documentation a little bit short. But maybe I overlooked something or I am not an explorer as I used to be.
    My problems:
    1) I do not know the difference between detail and child sub-reports
    2) I have not figured out how to pass values from "parent" report into Script / plsql-dbms_output / code sub-report
    What I am trying to do:
    I have a log table LOG_MSG with inbound messages for entities. The message (table row) has ID and content.
    There is also table LOG_ERROR which records errors for messages identified by ID (LOG_MSG.ID = LOG_ERROR.MSG_ID). I successfully used "Type: Detail, Style: Table" sub-report to display message errors for the active row. Neat :-)
    Now I am facing this problem. Message is composed from values separated by `|'. I would like to parse a message and display in subreport each message parameter in new row. I have a PL/SQL procedure, which parses a message and stores the parameters in global temporary table. So the report SQL should be something like:
    BEGIN P_PARSE (:ID); END;
    SELECT *
    FROM TMP_PARAMS;
    Should I use Detail or Child type? Table / script / ... style? How to pass a parameter to Script subreport? My every attempt to pass a value from parent repor failed (:ID, &ID, #ID#) :-(
    Thank you for your help.

    Hi,
    I have this report and it works:
    Master:
    select 'X' dummy, 123 num
    from dual
    union
    select 'Y' dummy, 456 num
    from dual
    Detail (on single line and with bind variable in UPPERCASE):
    declare bind1 varchar2(100) := :DUMMY; begin dbms_output.put_line ('There is '||bind1||' in master.'); end;
    The column from master must be in uppercase when used in child pl/sql and whole pl/sql must be on single line.
    Note the difference in upper/lowercase for dummy column. Even it is un lowercase in master, in child it must be in uppercase.
    In this way it works for me.
    Regards Libor

  • MS SQL DB User Management Connector Unable to Select Multiple Server

    Hi,
    We are trying to connect to multiple server using MS SQL DB user management connector but receive the error below when selecting server.
    <Sep 3, 2012 4:28:59 PM MYT> <Error> <XELLERATE.APIS> <BEA-000000> <Class/Method: tcLookupOperationsBean/getLookupValuesForColumnFilteredData encounter some problems: Lookup.PDBUM.MSSQL.DBNamesis not a valid form field>
    Running InitUtil
    Running ExecuteStoredProcForAuthTypeUser
    Running SetProcessFormData
    <Sep 3, 2012 4:30:13 PM MYT> <Error> <XELLERATE.ADAPTERS> <BEA-000000> <Class/Method: tcAdpEvent/verifyServer encounter some problems: IT Resource Type mismatch found for Adapter variable MSSQL_ITRVerify that IT Resource selected on Process Form matches IT Resource type selected for variable>
    Running InitUtil
    Running ExecuteStoredProcForAuthTypeUser
    Running SetProcessFormData
    Running COMBINENAMEWITHSUFFIXPA
    Target Class = com.thortech.xl.util.adapters.tcUtilStringOperations
    Running COMBINENAMEWITHSUFFIXPA
    Target Class = com.thortech.xl.util.adapters.tcUtilStringOperations
    Running InitUtil
    Running ExecuteStoredProcForAuthTypeUser
    Running SetProcessFormData
    <Sep 3, 2012 4:33:13 PM MYT> <Error> <XELLERATE.ADAPTERS> <BEA-000000> <Class/Method: tcAdpEvent/verifyServer encounter some problems: Could not determine IT Resource Key for variable MSSQL_ITR>
    delete mds name:/db/MSSQL DB User Privilege Login Requestrecon.profile
    Unable to delete profile with mds name:/db/MSSQL DB User Privilege Login Requestrecon.profile
    <Sep 3, 2012 4:33:43 PM MYT> <Warning> <Socket> <BEA-000450> <Socket 8 internal data record unavailable (probable closure due idle timeout), event received 17>
    <Sep 3, 2012 4:33:48 PM MYT> <Warning> <Socket> <BEA-000450> <Socket 4 internal data record unavailable (probable closure due idle timeout), event received 17>
    MS SQL DB connector version is 9.1.0.4
    Any ideas on this error above?
    Thank you.
    Edited by: 950985 on Aug 17, 2012 12:21 AM

    verify lookup : Lookup.DBUM.MSSQL.Configuration and provide the required information (eg: provide query property file)
    --nayan                                                                                                                                                                                                                                                                   

  • Pl/sql in oracle reports 6.0

    Hi ,
    I am new to oracle reports, is there any way to use pl/sql in oracle reports.I mean i have to take aggregate data from Oracle and to print/populate the data according to slabs(Say distance slab or time slab).Can u please provide me sample code...
    mail id : [email protected]
    thanks & regards
    Anand M

    you can use ref cursor in your pl/sql stored procedure and then call it in your reports

  • How validate HTML using PL/SQL

    Hi,
    I try validate HTML using PL/SQL that user inputs.
    I did create below function for that purpose
    CREATE OR REPLACE
    FUNCTION validate_html(
      p_html IN VARCHAR2
    ) RETURN BOOLEAN
    AS
      l_comment  XMLTYPE;
      xml_parse_err EXCEPTION;
      PRAGMA EXCEPTION_INIT (xml_parse_err , -31011);
    BEGIN
      l_comment := xmlType.createXML('<root><row>' || p_html || '</row></root>');
      RETURN TRUE;
    EXCEPTION WHEN xml_parse_err THEN
      RETURN FALSE;
    END;
    Function works ok and return true if I run e.g.
    BEGIN
      IF validate_html('<p>Hello</p>') THEN
        dbms_output.put_line('OK');
      ELSE
        dbms_output.put_line('Not valid HTML');
      END IF;
    END;
    And return false if I enter not valid HTML like
    BEGIN
      IF validate_html('<p>Hello') THEN
        dbms_output.put_line('OK');
      ELSE
        dbms_output.put_line('Not valid HTML');
      END IF;
    END;
    But it return false also if I run below
    BEGIN
      IF validate_html('<p>Hello &nbsp</p>') THEN
        dbms_output.put_line('OK');
      ELSE
        dbms_output.put_line('Not valid HTML');
      END IF;
    END;
    Problem seems to be that &nbsp (there is ; in end but do not know how post it without forum convert that to space) witch is valid HTML for me.
    I know that HTML is not XML, but can I use Oracle database XML functions for validating HTML?
    How I should validate user inputted HTML?
    I'm currently developing this using Oracle XE 11G database.
    Regards,
    Jari

    Not an elegant way:
    But try this.........
    CREATE OR REPLACE FUNCTION validate_html (p_html IN VARCHAR2)
       RETURN BOOLEAN AS
       l_comment       XMLTYPE;
       xml_parse_err   EXCEPTION;
       PRAGMA EXCEPTION_INIT (xml_parse_err, -31011);
    BEGIN
       l_comment :=
          xmlType.createXML (
             '<root><row>'
             || CASE
                   WHEN INSTR (p_html, '&') > 0 THEN
                      UTL_I18N.escape_reference (p_html)
                   ELSE
                      p_html
                END
             || '</row></root>');
       RETURN TRUE;
    EXCEPTION
       WHEN xml_parse_err THEN
          RETURN FALSE;
    END;
    SET DEFINE OFF
    SET SERVEROUTPUT ON
    BEGIN
       IF validate_html ('<p>Hello') THEN
          DBMS_OUTPUT.put_line ('OK');
       ELSE
          DBMS_OUTPUT.put_line ('Not valid HTML');
       END IF;
    END;
    SET DEFINE OFF
    SET SERVEROUTPUT ON
    BEGIN
       IF validate_html ('<p>Hello &nbsp</p>') THEN
          DBMS_OUTPUT.put_line ('OK');
       ELSE
          DBMS_OUTPUT.put_line ('Not valid HTML');
       END IF;
    END;
    Cheers,
    Manik.

  • Using a SQL user-defined function in Crystal Reports XI

    Post Author: JoannKarp
    CA Forum: Formula
    Is it possible to use a user defined function in SQL and use this in multiple Crystal reports?
    JoannKarp

    SELECT COALESCE(ufn_GetAddressByBusinessEntityIDandAddressTypeID(table1.BusinessEntityID,712),ufn_GetAddressByBusinessEntityIDandAddressTypeID(table1.BusinessEntityID,712)) AS Zipcode
      FROM table1
    Nope. This is two function calls. coalesce(a, b, c, ...) is just syntatic sugar for
       CASE WHEN a IS NOT NULL THEN a
            WHEN b IS NOT NULL THEN b
            WHEN c IS NOT NULL THEN c
       END
    But if you use isnull it's a different matter. (But isnull() permits two arguments.)
    Erland Sommarskog, SQL Server MVP, [email protected]

  • 4.1EA2 User-Defined-Report strips CRLF when using PL/SQL DBMS Output

    Hi,
    I have a report with a child report.
    That child report uses pl/sql to print to the screen. (dbms output)
    When i use the procedure manually it prints fine.
    When i copy this output to a text editor i can see the CRLF in there.
    If i call the same procedure tru the reports section of SQLDeveloper the output is stripped of any CRLF characters.
    This is causing it to be useless for me: i am using it to generate code and it all appears as one big line on the screen.
    Copying this to a text editor indeed shows all CRLFs gone.
    Is this intentional or a bug ?

    Jeff,
    Thnx for the answer.
    I don't have a problem writing html in my code being a former webdeveloper with experience in apex as well.
    The problem is that the option presents itself as a standard plsql dbmsoutput, which suggests identical output as a dbmsoutput pane in sqldeveloper.
    From your answer i gather it really is supposed to do html formatting.
    Your "solution" of inserting br tags would be fine if it weren't for the fact that when i do a copy of the output in this report pane sqldeveloper strips away the br tags but doesn't replace them with crlf's.
    And since the crlfs that were in the output are also stripped in this result pane i get a single line of text when i copy over a page of text from the result pane into a normal texteditor.
    As such it behaves differently then say a browser when i copy a page of text from the browser and paste it in a text editor. There i see the crlfs that were present in the original source.
    Is there a listing somewhere that explains what tags are supported?
    Or CSS ?
    Does it support stuff like white-space: pre ?
    I understand the usefullness of a html-aware plsql dbmsoutput output option in the reports list of a user-defined report.
    However i would like to use this opportunity to advocate to include , as an extra option or tick box etc., an option to just display the output as the normal dbmsoutput pane displays it.
    That is without extra formatting.
    I like the idea of being able to click in the table section above and to have bottom pane generate the appropriate code as output.
    That  use-case can not happen right now since it formats as html (and not even the correct way) or, when going along with this route, strips everything to a single line of text when copying the data from the result pane.
    rgrds mike

  • Report Using PL/SQL Region

    Hi,
    I have bit experiment create custom reports using PL/SQL region
    http://dbswh.webhop.net/apex/f?p=BLOG:READ:0::::ARTICLE:97800346956448
    I would like have from you tips and ideas how enhance this.
    Because I'm not so good with SQL,
    I really appreciate if you have tips enhance performance for query used for cursor.
        /* Report query */
        l_sql := '
          SELECT * FROM(
            SELECT a.*, row_number() OVER (ORDER BY '
            || l_sort_col
            || ' '
            || l_sort_ord
            || ') rn, COUNT(1) over() mrn
            FROM(' || l_sql || ') a
          ) WHERE rn BETWEEN ' || l_start_row || ' AND ' || l_last_row
        ; Regards,
    Jari

    Hi Jari
    I'm guessing you're trying to do paginated grid data or somewthing similar? You could try something like this...
        l_sql := 'SELECT * '||
               'FROM ('||
                      'SELECT /*+ FIRST_ROWS(n) */ '||
                              'a.*, ROWNUM rnum '||
                       'FROM ('||l_sql||' '||
                              'ORDER BY '||l_sort||' '||l_dir||') a '||
                       'WHERE ROWNUM <= '||l_max_row||') '||
               'WHERE rnum >= '||l_start;The variables would be initialized in the procedure as follows...
        l_max_row := p_start + p_limit;
        l_start   := p_start + 1;
        l_sort    := NVL(p_sort,'1');
        l_dir     := NVL(p_dir, 'ASC');My application process would be called something like follows, to spit out a JSON object...
    BEGIN
      htp.p(wwv_flow.g_widget_num_return||'(');
      munky_extjs.grid_json(p_app_id => wwv_flow.g_x01,
                        p_app_page_id => wwv_flow.g_x02,
                        p_region_id => TO_NUMBER(wwv_flow.g_x03),
                        p_start => NVL(wwv_flow.g_x04,0),
                        p_limit => NVL(wwv_flow.g_x05,10),
                        p_sort => wwv_flow.g_x06,
                        p_dir => wwv_flow.g_x07);
      htp.p(')');
    END;I think your use of analytics in the inner query may be slowing you down if you have a lot of data?
    Cheers
    Ben

Maybe you are looking for

  • Best way to import addresses from outook into address book?

    is there a way to import a csv file in its entirety? thanks!

  • Mini DV to external drive to iMovie to DVD – strategy?

    I have had 4 hours of old home movies transferred from Beta to mini dv tapes, and plan to transfer them to an external firewire drive using a borrowed camcorder, then use iMovie to edit and burn them onto a one hour DVD. Can I use the copy of iMovie

  • Movie Purchases Question

    I am looking at purchasing an Apple TV. I like the idea of keeping my purchased movies on my Apple TV, rather than consuming HD space on my MBP. My single concern is whether I will be able to push those purchased movies from my Apple TV to my iPhone

  • How to create varying number of tree hierarchies

    I have a db table with recursive tree structure established through id and parentId columns. There can be n first level parents(records with parentId=null); below data shows two first level parents(A and X). Name Id ParentId A 1 null B 2 1 C 3 2 X 4

  • DML Operations in Stored Function

    Hi, I have used Update Statement in a function. Which is giving an errror (ORA-14551: cannot perform a DML operation inside a query). Can I use DML operations in a stored function ? (I need help on locking master/transaction tables, i.e if a one user