Performing a Query on an Oracle DB from an iPhone

I'm looking to essentially have a connection with an existing Oracle DB that is housing some information that I would like to retrieve when a user puts in a query from an iPhone. I read sometime back that this would be doable in SDK 3.0. Anyone have some insight to this? Posting on a few different boards to get some info. Haven't been able to find anything anymore, just rumors.
Appreciate the help.
Edited by: user11219477 on Jun 1, 2009 10:47 AM

Check
Note 1035051 - Transportable tablespaces
which describes the procedure. Also have a look at
Metalink 433918.1 "What Is The Best Practice If You Want To Migrate Oracle Database To 10g Release To A Different Operating System?"
For the R3load export/import you can check what I´ve written in the "Migration" forum:
Markus

Similar Messages

  • Low performances when querying data dictionary Oracle 11g

    Query:
    SELECT
    ucc_fk.column_name FK_COLUMN_NAME,
    ucc_pk.table_name PK_TABLE_NAME,
    ucc_pk.column_name PK_COLUMN_NAME
    FROM user_constraints uc_fk
    INNER JOIN user_cons_columns ucc_fk ON (ucc_fk.constraint_name = uc_fk.constraint_name)
    INNER JOIN user_constraints uc_pk ON (uc_pk.constraint_name = uc_fk.r_constraint_name)
    INNER JOIN user_cons_columns ucc_pk ON (ucc_pk.constraint_name = uc_fk.r_constraint_name AND ucc_pk.position = ucc_fk.position)
    WHERE
    uc_fk.constraint_type = 'R' AND
    uc_pk.constraint_type = 'P' AND
    uc_fk.table_name = 'TABLE_NAME';
    works ok on 10g but is very slow on 11g? How to improve performances?

    You dont need to join with user_constraints again unless you are trying to avoid references to a unique key.
    SELECT ucc_fk.column_name FK_COLUMN_NAME, ucc_pk.table_name PK_TABLE_NAME, ucc_pk.column_name PK_COLUMN_NAME
      FROM user_constraints uc_fk
           JOIN user_cons_columns ucc_fk
              ON (ucc_fk.constraint_name = uc_fk.constraint_name)
           JOIN user_cons_columns ucc_pk
              ON (ucc_pk.constraint_name = uc_fk.r_constraint_name
              AND ucc_pk.position = ucc_fk.position)
    WHERE uc_fk.constraint_type = 'R'
       AND uc_fk.table_name = 'TABLE_NAME';As you can see I have removed the join to user_constraints and hence the condition uc_pk.constraint_type = 'P'
    The reason being the it is already validated to be in ('P','U') for all r_constraint_names.
    G.

  • I want to query oracle database from sql server can anyone tell steps 2 fo

    i want to query oracle database from sql server can anyone tell steps 2 followed
    i tried with linked servers but it is throwing errors can anyone hepl in this regard
    The operation could not be performed because the OLE DB provider 'MSDAORA' was unable to begin a distributed transaction.
    OLE DB error trace [OLE/DB Provider 'MSDAORA' ITransactionJoin::JoinTransaction returned 0x8004d01b].

    First of all - you are in the wrong forum.
    Look either for the Database general or search for Transparant / Heterogenous Gateways.
    cu
    Andreas

  • I want to query oracle database from sql server can anyone tell steps 2 fol

    i want to query oracle database from sql server can anyone tell steps 2 followed
    i tried with linked servers but it is throwing errors can anyone hepl in this regard
    The operation could not be performed because the OLE DB provider 'MSDAORA' was unable to begin a distributed transaction.
    OLE DB error trace [OLE/DB Provider 'MSDAORA' ITransactionJoin::JoinTransaction returned 0x8004d01b].

    First of all - you are in the wrong forum.
    Look either for the Database general or search for Transparant / Heterogenous Gateways.
    cu
    Andreas

  • Calling oracle function from Access passthrough query does not return list

    Thanks to the help I received in an earlier post I've created an oracle 10g function that returns a list after executing the sql it contains. It works in oracle, using sql developer.
    I need to have the list that it returns show up in MS Access via a passthrough query. It's not working so far. The connection string etc is ok, I'm able to use passthrough queries to run sql strings successfully. But when I try to call the function via the Access passthrough query at first nothing seems to happen (ie no list appears) and if I try to run it again, there is a odbc error 'call in progress. Current operation canceled'. There are only the three records in the table. I'm missing something, can anyone spot it?
    The passthrough query looks like this
    select * from fn_testvalues from dual
    Again that runs in oracle.
    To create the testing table and 2 functions see below.
    CREATE TABLE t_values (MyValue varchar2(10));
    Table created
    INSERT INTO t_values (
    SELECT 'Merced' c1 FROM dual UNION ALL
    SELECT 'Pixie' FROM dual UNION ALL
    SELECT '452' FROM dual);
    3 rows inserted
    CREATE OR REPLACE FUNCTION fn_isnum(p_val VARCHAR2) RETURN NUMBER IS
    n_val NUMBER;
    BEGIN
    n_val := to_number(p_val);
    RETURN 1;
    EXCEPTION
    WHEN OTHERS THEN
    RETURN 0;
    END;
    Function created
    testing the table:
    SELECT val, fn_isnum(MyValue ) isnum
    FROM t_values;
    VAL ISNUM
    Merced 0
    Pixie 0
    452 1
    Now the function that is called in the passthrough query:
    create or replace function fn_testvalues
    return sys_refcursor is
    rc sys_refcursor;
    begin
    open rc for
    Select t_values.*, fn_isnum(MyValue) IsNum from t_values;
    return(rc);
    end fn_testvalues;

    lecaro wrote:
    OK. But obviously there is some oracle object that one can call via an Access pass-through query which returns rows?Just to clarify. You could fetch data in Access from an Oracle function that returns a ref cursor using VBA editor. To use a pass-through query Oracle function should be a table function or pipelined table function:
    CREATE OR REPLACE
      TYPE testvalues_obj_type
        AS OBJECT(
                  val varchar2(10),
                  isnum number
    CREATE OR REPLACE
      TYPE testvalues_tbl_type
        AS TABLE OF testvalues_obj_type
    CREATE OR REPLACE
      FUNCTION fn_testvalues
        RETURN testvalues_tbl_type
        PIPELINED
        IS
            CURSOR testvalues_cur
              IS
                SELECT  testvalues_obj_type(MyValue,fn_isnum(MyValue)) testvalues_obj
                  FROM  t_values;
        BEGIN
            FOR v_rec IN testvalues_cur LOOP
              PIPE ROW(v_rec.testvalues_obj);
            END LOOP;
            RETURN;
    END;
    /To test it in Oracle:
    SELECT  *
      FROM  TABLE(fn_testvalues)
    VAL             ISNUM
    Merced              0
    Pixie               0
    452                 1
    SQL> Now in Access pass-trough query window enter:
    SELECT  *
      FROM  TABLE(fn_testvalues);SY.

  • Performance of query , What if db_recycle_cache_size is zero

    Hi
    in our 11g Database , We have some objects for which default buffer pool is recycle pool.But i observed recycle pool size is zero (db_recycle_cache_size = 0 ).
    Now if we issue a sql for which we need to access these objects , what happen ? i strongly think as there is no recycle bin , it will go in to traditional default buffer cache and obey normal LRU algorithm.Am i missing something here ?
    The issue we face is , we have a query which is picking up correct index but it takes around 3 Minutes.I see that the step which takes more time is index range sacn which fetches around 50k records and takes 95% of whole query execution time.Then i observed that index is configured to have default pool as recycle pool.If i rerun the same query again and again , execution times are close to zero (No wonder , no physical reads in subsequent execution).
    I am thinking of setting up recycel pool .What else i may need to consider tuning this query ?
    Thanks and Regards
    Pram

    >
    Now if we issue a sql for which we need to access these objects , what happen ? i strongly think as there is no recycle bin , it will go in to traditional default buffer cache and obey normal LRU algorithm.Am i missing something here ?
    >
    Recycle bin? What does that have to do with anything?
    You are correct - with no keep or recycle cache the default buffer cache and LRU are used for aging.
    >
    I am thinking of setting up recycel pool .
    >
    Why - it doesn't sound like you know the purpose of the recycle pool. See '7.2.4 Considering Multiple Buffer Pools' in the Performance Tuning Guide
    http://docs.oracle.com/cd/B28359_01/server.111/b28274/memory.htm
    >
    With segments that have atypical access patterns, store blocks from those segments in two different buffer pools: the KEEP pool and the RECYCLE pool. A segment's access pattern may be atypical if it is constantly accessed (that is, hot) or infrequently accessed (for example, a large segment accessed by a batch job only once a day).
    Multiple buffer pools let you address these differences. You can use a KEEP buffer pool to maintain frequently accessed segments in the buffer cache, and a RECYCLE buffer pool to prevent objects from consuming unnecessary space in the cache. When an object is associated with a cache, all blocks from that object are placed in that cache. Oracle maintains a DEFAULT buffer pool for objects that have not been assigned to a specific buffer pool. The default buffer pool is of size DB_CACHE_SIZE. Each buffer pool uses the same LRU replacement policy (for example, if the KEEP pool is not large enough to store all of the segments allocated to it, then the oldest blocks age out of the cache).
    By allocating objects to appropriate buffer pools, you can:
    •Reduce or eliminate I/Os
    •Isolate or limit an object to a separate cache
    >
    Using a recycle pool isn't going to affect that initial 3 minute time. It would keep things from being aged out of the default cache when the index blocks are loaded.
    Further using a recycle pool could cause those 'close to zero' times for the second and third access to increase if the index blocks from the first query were 'recycled' so another query could use the blocks. Recycle means - thow-it-away when you are done if you want.
    >
    What else i may need to consider tuning this query ?
    >
    If it ain't broke, dont' fix it. You haven't shown that there is anything wrong with the query you are talking about. How could we possibly know if 3 minutes if really slow or if it is really fast? You haven't posted the query, an execution plan, row counts for the tables or counts for the filter predicates.
    See this AskTom article for his take on the RECYCLE and other pools.

  • Query works in Oracle Client but not JDBC

    The query is as follows:
    SELECT COUNT(*) THE_COUNT FROM sentorders WHERE ordersentdate BETWEEN '15-JAN-01' and '15-JAN-03';When I run this query in the Oracle client (SQL+) it tells me that THE_COUNT is 4 which is correct but when I use the following JDBC code I get THE_COUNT is 0 which is incorrect.
    public ResultSet viewTotalSentOrdersByDate()
      throws SQLException, Exception {
          String beginDate = "15-JAN-01";
          String endDate = "15-JAN-03";
          ResultSet rs = null;
        try  {
          String queryString = ("SELECT COUNT(*) THE_COUNT FROM sentorders WHERE ordersentdate BETWEEN '" + beginDate + "' and '" + endDate + "'");
          System.out.println(queryString);
          Statement stmt = con.createStatement();
          rs = stmt.executeQuery(queryString);
          while(rs.next()) {
           System.out.println(rs.getString("THE_COUNT"))
        } catch (SQLException sqle) {
          error = "SQLException: Could not execute the query.";
          throw new SQLException(error);
        } catch (Exception e) {
          error = "An exception occured.";
          throw new Exception(error);               
        return rs;
      }Thanks for the help
    Zac

    The query is as follows:
    SELECT COUNT(*) THE_COUNT FROM sentorders WHERE ordersentdate BETWEEN '15-JAN-01' and '15-JAN-03';When I run this query in the Oracle client (SQL+) it tells me that THE_COUNT is 4 which is correct but when I use the following JDBC code I get THE_COUNT is 0 which is incorrect.
    public ResultSet viewTotalSentOrdersByDate()
    throws SQLException, Exception {
    String beginDate = "15-JAN-01";
    String endDate = "15-JAN-03";
    ResultSet rs = null;
    try {
    String queryString = ("SELECT COUNT(*) THE_COUNT FROM sentorders WHERE ordersentdate BETWEEN '" + beginDate + "' and '" + endDate + "'");
    System.out.println(queryString);
    Statement stmt = con.createStatement();
    rs = stmt.executeQuery(queryString);
    while(rs.next()) {
    System.out.println(rs.getString("THE_COUNT"))
    } catch (SQLException sqle) {
    error = "SQLException: Could not execute the query.";
    throw new SQLException(error);
    } catch (Exception e) {
    error = "An exception occured.";
    throw new Exception(error);
    return rs;
    }Thanks for the help
    Zac

  • Oracle report from 6i to 10g

    hi all,
    We try to move oracle report from 6i to 10g. however we found that the report's record ordering is different.
    The case is that, the record in report is ordered according to the attribute "break order".
    There is no "order by" in sql".
    It runs without problems in 6i, but in 10g , the ordering of the record has no ordering.
    Please help to solve the problems or give some advice. Thanks.

    Break order property only works for ordering in break groups. For other groups (like the lowest level group) you have to use order by in your SQL.
    That was also the case in 6i, so you may just have been lucky that it worked at all.
    This is from the Help:
    The Break Order property is the order in which to display the column's values. This property applies only to columns that identify distinct values of user-created groups (i.e., break groups ). The order of column values in a default group is determined by the ORDER BY clause of the query for SQL queries

  • How Performance can be improved at  Oracle Database level

    Hi Everyone,
    Need a suggestion ......
    I m managing SAP Landscape of Retail Sector Client.
    where SAP ERP PRD database size is : 2 TB.
    at SAP Application Layer .... we have setup five application system to distribute load because around 1200 users work concurrently.
    Out of these 1200 Users around 300 Users keeps on fetching
    reports from database which worsen database performance.
    We have changed parameters of Database to improve performance.
    What we have thought to setup replica of PRD system .
    On which Only Report Users will execute reports.
    & that System will work as Disaster Recovery Site of PRD System.
    In process of that We have restored the PRD Backup on another System. But How can we replicate daily changes of PRD System on Restored System.
    One which we have thought by applying offline archive files.
        daily . But somebody has told us that we can not apply
        offline archive files of PRD System to restored system
        because that Restored database is in Open stage & being
       used.
    (ii) Secondly, Incremental Backup which is very time-consuming action.
    Please suggest , If you have an idea & I want to know How
    offline archive log file application on DR Site .
    Thanks in advance !!!
    Points will be rewarded !!!
    Thanks
    Deepak !!!

    deepak  gosain wrote:>
    > Hi Everyone,
    Hi Deepak!
    > Need a suggestion ......
    I'll try my best
    > I m managing SAP Landscape of Retail Sector Client.
    > where SAP ERP PRD database size is : 2 TB.
    > at SAP Application Layer .... we have setup five application system to distribute load because around 1200 users work concurrently.
    >
    > Out of these 1200 Users around 300 Users keeps on fetching
    > reports from database which worsen database performance.
    Hmm.. might happen.
    > We have changed parameters of Database to improve performance.
    Oh - which ones? Why? Who told you to?
    > What we have thought to setup replica of PRD system .
    > On which Only Report Users will execute reports.
    > & that System will work as Disaster Recovery Site of PRD System.
    This setup does not work for SAP environments. To get reports out of a system with SAP the database must be open to writes.
    > In process of that We have restored the PRD Backup on another System. But How can we replicate daily changes of PRD System on Restored System.
    Such thing would be done via a Standby-DB.
    > One which we have thought by applying offline archive files.
    >     daily . But somebody has told us that we can not apply
    >     offline archive files of PRD System to restored system
    >     because that Restored database is in Open stage & being
    >    used.
    That person told you the truth.
    > (ii) Secondly, Incremental Backup which is very time-consuming action.
    Depends on your reference. Compared to what is it very time-consuming?
    Compared with a full DB-Backup this is likely to be the less time-consuming option.
    > Please suggest , If you have an idea & I want to know How
    > offline archive log file application on DR Site .
    For a how-to in Standby-Setup you may want to have a look into the Oracle documentation like here [Introduction to Oracle Data Guard |http://download.oracle.com/docs/cd/B19306_01/server.102/b14239/concepts.htm#SBYDB00010]
    > Thanks in advance !!!
    You're welcome !!!
    > Points will be rewarded !!!
    Oh - nice !!!!!!!!!!
    Now get a bit earnest as well:
    From what you described it sounds like you're setup is a bit undersized.
    If your report users use BI for their reports, than it may pay off to setup a seperate BI system that gets it's data from the ERP system automatically and not whenever a user starts a report.
    Another option may be to consider using a RAC cluster  - but this would be a very expensive option.
    In any case the important first step has to be to find out, what the real cause for the performance degration is.
    Perhabs the I/O Subsystem is the problem, perhabs the network. Perhabs another CPU would do wonder.
    You'll never know - before you analyse this in depth.
    Reading hints would include these notes:
    618868     FAQ: Oracle performance
    72638     Performance problems with SQL*Net
    354080     Note collection for Oracle performance problems
    853576     Oracle 10g: Performance analysis w/ ASH and Oracle Advisors
    793113     FAQ: Oracle I/O configuration
    619188     FAQ: Oracle wait events
    805934     FAQ: Database time
    Best regards,
    Lars

  • Unable to retrieve data from a nested table in Oracle 8i from JSP

    How do i retrieve data from a nested table in Oracle 8i from my JSP code?
    When i try to execute the query , a general error is thrown.
    Kindly advice as soon as possible.

    How do i retrieve data from a nested table in Oracle 8i from my JSP code?
    When i try to execute the query , a general error is thrown.
    Kindly advice as soon as possible.

  • Setting up new dbname/sid while creating oracle db from rman backups in 11g

    Hi all,
    I have rman backups and need to create another database from rman backups with different name... but it is unsuccessful..
    created instance with new db...
    running create new db connecting rman auxiliary sys/password@newdb
    run {
    SET NEWNAME FOR DATAFILE 1 TO 'F:\app\HOME\oradata\clonedb1\SYSTEM01.DBF';
    SET NEWNAME FOR DATAFILE 2 TO 'F:\app\HOME\oradata\clonedb1\SYSAUX01.DBF';
    SET NEWNAME FOR DATAFILE 3 TO 'F:\app\HOME\oradata\clonedb1\UNDOTBS01.DBF';
    SET NEWNAME FOR DATAFILE 4 TO 'F:\app\HOME\oradata\clonedb1\USERS01.DBF';
    SET NEWNAME FOR DATAFILE 5 TO 'F:\app\HOME\oradata\clonedb1\EXAMPLE01.DBF';
    SET NEWNAME FOR TEMPFILE 1 TO 'F:\app\HOME\oradata\clonedb1\TEMP01.DBF';
    DUPLICATE DATABASE TO clonedb
    pfile 'D:\TESTDELETE\initclonedb1.ora'
    BACKUP LOCATION 'F:\app\HOME\flash_recovery_area\orcl\'
    LOGFILE GROUP 1 ('F:\APP\HOME\ORADATA\ORCL\REDO01.LOG') SIZE 60M REUSE,
    GROUP 2 ('F:\APP\HOME\ORADATA\ORCL\REDO02.LOG.rdo') SIZE 60M REUSE,
    GROUP 3 ('F:\APP\HOME\ORADATA\ORCL\REDO03.LOG') SIZE 60M REUSE;
    Error it shown is in rman backup creation is as follows
    <part>>
    sql statement: alter system set db_name = ''ORCL'' comment= ''Modified by RMAN
    duplicate'' scope=spfile
    Oracle instance shut down
    Oracle instance started
    Total System Global Area 640286720 bytes
    Fixed Size 1376492 bytes
    Variable Size 314576660 bytes
    Database Buffers 318767104 bytes
    Redo Buffers 5566464 bytes
    Starting restore at 20-DEC-11
    allocated channel: ORA_AUX_DISK_1
    channel ORA_AUX_DISK_1: SID=133 device type=DISK
    channel ORA_AUX_DISK_1: restoring control file
    channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:07
    output file name=F:\APP\HOME\ORADATA\CLONEDB1\CONTROL01.CTL
    output file name=F:\APP\HOME\FLASH_RECOVERY_AREA\CLONEDB1\CONTROL02.CTL
    Finished restore at 20-DEC-11
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of Duplicate Db command at 12/20/2011 07:07:11
    RMAN-03015: error occurred in stored script Memory Script
    RMAN-06136: ORACLE error from auxiliary database: ORA-01102: cannot mount databa
    se in EXCLUSIVE mode
    RMAN> EXIT
    how can i prevent rman setting db_name=orcl which is already exists in the db.. i need to create db from rman backups with different dbname...
    whould someone help me out, how can i create database from another database rman backups with different dbname/sid on same host..
    My pfile has new db_name , but while db creation rman setting to db_name to source dbname.. it should be new db name that i want create with new db name...
    is there any RMAN command to specify new DB name it should set while running
    sql statement: alter system set db_name = newdbname -- as part rman script execution...
    it appears to be i should not touch the soruce db.. i have access to only source db rman backups and need to create another db with different dbname/sid.. please do help...

    When you performing RMAN duplicate why you making your script so complicated?
    Your instance name and DB name can be different, But what is the contents in your pfile "D:\TESTDELETE\initclonedb1.ora" ? please do post
    Have you started any other services related to ORACLE? check in start --> run --> services.msc any other active oracles services, Make sure you have clonedb1.
    Startup in nomount
    check the connectivity to target server.
    SET NEWNAME FOR TEMPFILE 1 TO 'F:\app\HOME\oradata\clonedb1\TEMP01.DBF';Why you mentioning SET NEWNAME FOR DATAFILE ? You have option of db_file_name_convert/log_file_name_convert in case if your file system different in Target & auxiliary.
    BACKUP LOCATION 'F:\app\HOME\flash_recovery_area\orcl\'When you have backup in same location why you are mentioning this clause?
    First run duplicate from auxiliary server as
    rman target sys/*****@prod auxiliary /
    RMAN> duplicate target database to "db_name";
    Am not sure what you are trying to do. is it 11gR1 or 11gR2?
    You have option of duplicate from active database without having backup also..
    here some links please check it.
    http://docs.oracle.com/cd/E14072_01/backup.112/e10642/rcmdupdb.htm#BGBFDJHB
    RMAN 11GR2 : DUPLICATE WITHOUT CONNECTING TO TARGET DATABASE [ID 874352.1]
    knowledgespring      
         Newbie
    Handle:      knowledgespring
    Status Level:      Newbie (10)
    Registered:      Dec 26, 2007
    Total Posts:      243
    Total Questions:      77 (75 unresolved)
    So sad that forum was able to help only in two answers out of your 77 questions :(
    Edited by: CKPT on Dec 21, 2011 5:12 PM

  • Steps to upgrade my Oracle version from 11.1.0.6 to 11.2.0.1 in windows.

    Can anyone help me with the steps to upgrade my Oracle version from 11.1.0.6 to 11.2.0.1 in windows.
    Thanks in advance.

    If you are going to upgrade, you should upgrade to the latest 11gR2 patchset (currently 11.2.0.4). At a high level -
    1. Install 11.2.0.4 into a new separate ORACLE_HOME - see MOS Doc 1562139.1 and Contents
    2. Apply the latest 11.2.0.4 PSU bundle available for Windows - see MOS Doc 1454618.1
    3. Use DBUA to perform the upgrade - MOS Doc 870814.1 and Contents
    Also see
    MOS Doc 1645862.1

  • Query based on Oracle and MS Access connections

    I hope this is in the correct spot.
    I am using Oracle SQL Developer to extract data from some Read Only tables in Oracle.
    What I would like to do it have a list of numbers in a MS Access database to select the same number from Oracle tables, then export the data out to Access or Excel. There may be several thousand numbers at a time.
    I asked if they would give me one table with one column in Oracle I could read/write to but the answer was no.
    I have my connection strings working to both the Oracle tables and to the Access database but i can not figure out how to build a query using both tables.
    If I build a query to the Access table can I use that query somehow in the query of the Oracle table?
    Thanks
    Steve

    Not real sure if this is doable or would help, but perhaps you can load the access table into an Oracle Global Temporary Table? See http://www.oracle-base.com/articles/8i/TemporaryTables.php (and google on it). I think I'm assuming your 11 hour query had something to do with shovelling a bucketload of data to the access side, perhaps if you could show us the plan on the Oracle side that access was generating to get the Oracle data there might be a different answer.
    Oftentimes cross-db tools won't use Oracle features like analytics, or do slow-by-slow row processing where a short procedure could do things within the Oracle sql engine and return data in larger arrays.
    Sometimes mass data cleansings benefit from using server side tools outside of the db. Do you have the data from before it was loaded to Oracle? What Oracle platform are you on?

  • How to change report query dynamically in Oracle APEX?

    Hi,
    I want to dynamically change the where condition in APEX report query. Can anyone help me solve my this problem?
    (Just want to change the query which we change in Oracle Reports using lexical parameter to change &Where, &Order by etc. dynamically!!)
    Thanks, Praful

    Hi
    I've been using flexible queries in APEX for a few years now, and your question just added a whole new dimension to the flexible and powerful nature or writing reports in APEX.
    While APEX Interactive reporting has almost completely removed the need the equivalent of Lexicals in Oracle Reports, I thought it might be fun to try and use lexicals in an APEX report.
    Before we start I should summarise the powerful capability of APEX reporting to have oprtional parameters (lots and lots of them if this is needed).
    For each parameter, you simply add a page item which will hold the value of the parameter.
    The item/parameter can be populated by typing in the value, defining an LOV, using a date-picker etc.
    To make the parameter optional simply use an OR in the where clause.
    So for a apge item P200_PARAM1.....include
    WHERE (:P200_PARAM1 IS NULL
    OR COLUMN1 = :P200_PARAM1)
    This way you can either leave the page item null or type in / select a value from a LOV.
    There is a small quirk in APEX LOV's which sometimes returns a value of '%' or '%null%' - depending on the version - when no value is selected.
    See Patrick Wolf's solution for this at Re: Null value handling in LOVs
    I include this Application Process in all my APEX applications ;)
    Now let's look at using the equivalent of Oracle Reports Lexicals......
    First-off - this is based on the APEX SQL report - NOT Interactive Report.
    It relies on the fact that you can let the query be parsed only at runtime.
    1. Define an SQL report entering the 'core' of your query.
    With a query like SELECT ENAME, JOB FROM EMP
    Select 'Generic Columns' option in the 'Column Headings' section
    Finish the report creation
    2. Define a page item - say P200_LEXICAL - type text on the page
    3. Edit the report and update the SQL query to include your lexical page item
    SELECT ENAME, JOB FROM EMP &P200_LEXICAL. (REMEMBER THE '.' AT THE END)
    Ensure that the option "Use Generic Column Names (parse query at runtime only)" is selected at the bottom of the query
    4. Add a button to the page -using 'Create a button displayed among this region's items' the will submit the page.
    5. Run the page - you will see all the employee names and job desdriptions
    6. Enter a where clause into the 'Lexical' textbox - say "WHERE ENAME LIKE 'K%'" and click the 'Go' button
    Voila! your where clause is magically applied.
    Try any variant you like adding an ORDER BY clause etc...... this is FUN!
    7. Clear the value of the LEXICAL and click go.
    Edit the report and move the &P200_LEXICAL. into the selected columns (or add another one)
    SELECT ENAME, JOB &P200_LEXICAL. FROM EMP
    8. Run the page
    Enter ",SAL" in the textbox and "Go"
    We can add as many columns as we like (subject to the "Maximum number of generic report columns:" set below the SQL query in the report edit section)
    Now because we have all the flexibility in APEX of setting page items using SQL or PLSQL you can set the value of the lexical programatically, or just pre-set a few values in an LOV - the options are limitless.
    While I've never had the need to use lexicals - you can see that APEX provides the most Flexible Lexicals in town.
    Eat your heart out "Oracle Reports"!!!
    Have fun
    Mike

  • Create a new oracle database from OCI or OCCI client

    Hi,
    How can we create a new oracle database from OCI or OCCI client?
    i am using the oracle 11gR2
    Thanks in Advance,
    Sreekanth Polaka

    Though I have not tried creating a database, try if its doable.
    You can use OCI to perform SYSDBA operations.
    So connect as OCI_SYSDBA and try executing the entire create database command.

Maybe you are looking for

  • Kind of URGENT - WebDynpro F4 help in portal

    Hi, we developed a WebDynpro ABAP solution and everything was fine including portal, however after transport to new system enviroment F4 help is not working anymore only in portal. When calling WebDynpro directly it's fine. We thought that the note 9

  • Error in posing question?

    I have been trying to submit a question for days.  First it just plain disappeared.  Now I'm getting an error message with no explanation.  Has microsoft taken over this site?

  • MPD hangs when changing tracks or seeking

    MPD is VERY touchy when I change the current playing track, or seek. I've been using ncmpcpp, but I witness the same behavior with other clients too. Since I've seen other people mention the same stability issues, I was wondering if anyone came up wi

  • Bin determination in automatic TO creation for posting changes

    Hello guys, could someone provide some information or some links on how the automatic bin determination for posting changes will be processed in SAP WM? Actually I'm looking for some further information for automated processing during a posting with

  • How change CHARACTERSET to WE8ISO8859P1?

    Hi, How change character set the XE to WEISO8859P1, have problem with word special like ç, á, ã, â. I it would not work NCHAR ou NVARCHAR. Thank you. Ivan