Case of schema names with code insight

I'm running SQL Developer 3.0.04. I want my SQL statements to be of the form "SELECT * FROM schema.table" but I can't seem to find the right code insight option to make this happen. There seems to be a way to make everything lowercase (including keywords) but the closest I can get to what I really want is "SELECT * FROM SCHEMA.table".
How do I stop the schema name being upper-cased when using code insight without affecting the keywords?

I don't think you're understanding the issue. This is about code insight, not about the tables being defined in lower case. Here's a step by step example:
SELECT * FROM mys<ctrl+space> -> SELECT * FROM myschema
SELECT * FROM myschema.f<ctrl+space> -> SELECT * FROM MYSCHEMA.fred
when what I want is "SELECT * FROM *myschema*.fred"

Similar Messages

  • Transform the schema name with APPLY_DML_HANDELER

    Hello:
    I have referred following notes, but I was trying to transform the schema name from schema_name_A to Schema_name_B in APPLY_DML_HANDELER, which does not seem like working.
    264035.1 How To Transform Schema Name In Streams
    309575.1 How To Transform A Schema Name In Streams for DML and Simple DDL Operations
    313766.1 Streams Heterogeneous Apply To SQL*Server
    Please confirm, if what I am trying to do it doable or not? Below is handler code.
    CREATE OR REPLACE PROCEDURE APPLY_DML_HANDLER(in_any_data IN SYS.ANYDATA) IS
    v_in_lcr SYS.lcr$_ROW_RECORD;
    v_in_lcr_status PLS_INTEGER;
    BEGIN
    v_in_lcr_status := in_any_data.GETOBJECT(v_in_lcr);
    v_in_lcr.set_object_owner('CSRREP');
    v_in_lcr.EXECUTE(TRUE);
    END;
    All gets compiled good and runs, but dba_apply_errors shows Ora-23416.
    Thanks,
    Rohit

    Hi Rohit,
    ORA-23416: table "string"."string" does not contain a primary key constraint
    Cause: The master table does not constaint a primary key constraint or the primary key constraint has been disabled.
    Action: Create a primary key constraint on the master table or enable the existing constraint.
    It is doable. I've done already done that in 9i. Be conscious that that kind of handler is executed for each LCR. So, that's highly paid.
    I think there are new features to do it in a better way in 10g but I haven't tried it yet.
    I had a bug somewhat similar that I fixed doing the following:
    dbms_rule_adm.grant_object_privilege(
    privilege => SYS.DBMS_RULE_ADM.EXECUTE_ON_RULE_SET,
    object_name => v_ruleset_name,
    grantee => v_new_owner
    );

  • ANSI join syntax with code-insight

    I've noticed that SQL Developer 1.1.3 doesn't perform code-insight into table aliases when I use the ANSI join sytax. Is there a configuration option to make this possible or does it just not exist yet?

    Hi,
    Currently on SQL Developer 1.2, Windows XP, and Database 9.2
    I have the same problem too.
    The Code-Insight is unable to show the Code Completion for aliased table name in ANSI JOIN
    SELECT *
    FROM    Schema1.Table1 t1
    INNER JOIN Schema1.Table2 t2 ON t2.     -- cannot show the code-insightHowever the following code works just fine for the code-insight
    SELECT *
    FROM    Schema1.Table1 t1,
                  Schema1.Table2 t2
    WHERE t1.Field1 = t2.Field1Any suggestion?
    Regards,
    Buntoro

  • Schema name with a cursor

    Hello,
    I have a procedure that takes the user name as input. I need to get that username.tablename in a curor during execution. Can anyone tell me any possible way of doing this?
    Here is the sample outline of that procedure
    PROCEDURE p_merge_employee_info(p_schema_name in varchar2,po_status OUT VARCHAR2) IS
    cursor c1 is select * from p_schema_name.employee;
    begin
    for rec in c1
    loop
    dbms_output.put_line('test');
    end loop;
    end;
    /

    Probably you can start with this REF CURSOR example:
    scott@DBA> ed
    Wrote file afiedt.buf
      1  CREATE OR REPLACE PROCEDURE p_merge_employee_info (p_schema_name IN VARCHAR2)
      2  IS
      3     generic_cv   sys_refcursor;
      4     emprec       emp%ROWTYPE;
      5  BEGIN
      6     OPEN generic_cv FOR 'select * from ' || p_schema_name || '.emp';
      7     LOOP
      8        FETCH generic_cv
      9         INTO emprec;
    10        EXIT WHEN generic_cv%NOTFOUND;
    11        DBMS_OUTPUT.put_line ('empid:' || emprec.empno||' name:'||emprec.ename);
    12     END LOOP;
    13     CLOSE generic_cv;
    14* END;
    scott@DBA> /
    Procedure created.
    scott@DBA>  exec p_merge_employee_info ('scott');
    empid:7369 name:SMITH
    empid:7499 name:ALLEN
    empid:7521 name:WARD
    empid:7566 name:JONES
    empid:7654 name:MARTIN
    empid:7698 name:BLAKE
    empid:7782 name:CLARK
    empid:7788 name:SCOTT
    empid:7839 name:KING
    empid:7844 name:TURNER
    empid:7876 name:ADAMS
    empid:7900 name:JAMES
    empid:7902 name:FORD
    empid:7934 name:MILLER
    empid:4109 name:delfino
    PL/SQL procedure successfully completed.

  • Code Insight not working properly - 9.0.3. preview

    We are having some problems with Code Insight on the 9.0.3 preview version of JDeveloper. We have a couple of libraries which regularly change so when a new version comes along we simply overwrite the old one (they are saved in <JDEV_HOME>\jlib. In 9.0.2 all we needed to do was exit and restart JDeveloper and the new classes could be seen in Code Insight. This doesn't seem to be the case now although my code compiles OK. We thought that there might be a cache of some sort related to these libraries and what we've found is a folder under <JDEV_HOME>\lib called ojpd. There appears to be a file for each library in here. We renamed
    the ones related to our libraries and this fixed our problems, but a new version was created. It seems to us that JDeveloper should be checking the modified date of any of these libraries and if so create a new 'ojpd' file. Is this a known bug?
    Thanks
    Ian

    JDeveloper actually checks the number of bytes in a .jar file that it has stored parse data for. I believe there was a bug in the preview release involving this check. This bug has since been fixed.
    To work around it in the preview you can delete the ojpd files corresponding to the archives you have changed. The files will be named after the archive, with a hash of the unique part of their path appended.
    These files are only built for archives that are included in libraries, and reside under Oracle Home (the directory containing the jdev directory), or the User Home.

  • Slow code insight in JDev 9.0.3.1035

    Hello,
    sometimes when I invoke code insight in my Jdev it needs up to 30 secs to display. In this time JDeveloper is completely blocked and does not react to any keyboard or mouse input. It doesn't matter if the library is on a network drive or on the local harddisk, even with standard JDK-Lib (for example: java.text. ) this problem appears. And, this happens not always, sometimes the popup comes as fast as I set in JDev's preferences.
    Has anyone experienced such a behaviour??
    Thank you.
    Christian

    Interesting... I confirmed via. Metalink that there was a bug within JDev 9.0.3.1 that caused code insight to fail when editing JSP against at least an Orace Portal based project.. I'm not sure if it's related, but I have a feeling it might be. Are you by chance developing with Portal? I've also noticed no problems with code insight when i'm working with straight webapps built from Struts. Perhaps it's to do with the libraries in your project.
    If you're on Windows, try the sysinternals file monitor program (www.sysinternals.com) and see if it's trying to access large files or something over the network.
    HTH,
    -sean

  • OWB 10.1 Deploy Mgr. - Registration - schema name is grayed out, sometimes

    Environment:
    Repository - OWB 10.1.0.2 on UNIX (AIX 5.2)
    Target - Oracle 9.2.0.4 on UNIX (AIX 5.2)
    Question: I have several locations that have been registered in the past. When I right click a location and click on 'Register' in some cases the schema name comes up grayed out and I am unable to change it and other times it is open.
    Why is that and how do I change the schema name of a location?
    I have installed the new schema as a target through the runtime assistant and there is a working runtime repository in that instance.
    Any help is greatly appreciated.
    P.S. Yes, we are making plans to upgrade to 10.2 soon but not soon enough ;-)>
    -gary

    Hi,
    In order to edit/delete a location you need to unregister the location from all the Control Centers. A location might be registered to more than one Control Centers.
    Having said that if you have registered location A to Schema B in Control Center C, you need to unregister the location A from Control Center C.
    In case you have accidentally dropped the Schema B without unregistering the location A, then even if you unregister the location A from Control Center C, you will still see the user name and password fields grayed out. In that case you need to re-create the schema B, register the location A and then again unregister the location and then you will be able to edit it. Seems to be a bug in OWB.
    Regards
    -AP

  • Specify schema name in select statements

    Is there a way to specify the schema name for the connection so that I don't have to specify schema name with every statement?
    Currently I am executing the statement:
    Statement stmt = null;
    ResultSet rs = null;
    String getAllNames =
                   "SELECT NAME FROM " + schemaName +".NAMES " + schemaName +" WHERE STATUS_CODE != 12 ";
    stmt = conn.createStatement();
    rs = stmt.executeQuery(getAllNames);
    But I have a lot of such statements, a few which uses parameters.
    Is there a way I can specify the schemaName once and for all so that I don't have to perform string concat everytime the function is invoked.

    well I tried that, since the application runs under CICS which uses the trusted connection with DB2, all CICS application will be using the same userid and there is no way to ensure that other applications would not be using the same table name in some other application. So the only option I have is to specify the schema name with the select statements but I don't want to append the schema name with each statement.

  • Code Insight.... Cloumn Names?

    Hi Guys,
    I was recently using SQL Worksheets and toyed with the code insight, and noticed that if I type in the schema name, code insight kicks in an provide a list of table names in that schema.
    But when I reach the where section of my SQL and the code insight does not provide a list of column names for the table alias. That sucks! :o)
    Am I missing something?
    Example:
    select *
    from xx.(1) xse
    where xse.(2)
    (1) code insight provides list of table names.
    (2) code insight does NOT provide a list of column name for table xse.

    Might be worth posting this one over on the SQL Developer forum - I believe we get this functionality from SQL Developer in future releases of JDeveloper.
    Thanks,
    Brian

  • Code Insight and mixed case PL/SQL identifiers

    Let’s assume I hava a package “Test” with a procedure “DoSomeReallyHardWork”.
    I would like code insight to complete a call of this procedure and preserve the original case.
    I don’t like “test.dosomereallyhardwork” and I strongly dislike “TEST.DOSOMEREALLYHARDWORK".
    Is there any way to achive this kind case preservation?
    I recompiled my code with PL/Scope turned on, but it seems that all identifiers are stored in uppercase. Bug or feature?

    The identifiers are case insensitve, so your code could as easily read
    create or replace procedure TestProc is
    ThisVarHasNoMeaning varchar2(100);
    begin
    ThisVarHasNoMeaning := 'Test';
    THISVARHASNOMEANING := 'Other';
    end TestProc
    You only have one identifier, but can have multiple capitalizations. While it would be nice if the declaration was the 'definitive' one, it looks like they've gone the easy route and uppercased them all for consistency.
    If you used _ (the This_Var) in your variable names, at least you could use initcap to pretty them up.

  • Prefixing sequence with schema name in generated sql on oracle

    Hi,
    We use kodo 3.4 with an oracle database in a J2EE environment.
    When we put on the kodo tracing during on of our testcases we see statements being generated like :
    select LOOPBAANPERIODESEQUENCE.NEXTVAL from DUAL
    When we check the rest of the statements we see :
    SELECT * FROM PC52290.EINDELOOPBAAN (EINDELOOPBAAN being a table)
    Is there any way to make kodo generate the following statement ?
    select PC52290.LOOPBAANPERIODESEQUENCE.NEXTVAL from DUAL
    Our kodo.properties we use :
    javax.jdo.PersistenceManagerFactoryClass=kodo.jdbc.runtime.JDBCPersistenceManagerFactory
    javax.jdo.option.Optimistic=true
    javax.jdo.option.RetainValues=true
    javax.jdo.option.NontransactionalRead=true
    kodo.jdbc.DBDictionary=kodo.jdbc.sql.OracleDictionary
    kodo.jdbc.ForeignKeyConstraints=true
    kodo.LicenseKey=<VALID_LICENSE_HERE>
    kodo.Log=DefaultLevel=WARN,SQL=TRACE,Runtime=WARN,Configuration=WARN
    kodo.jdbc.Schemas=PC52290
    kodo.PersistentClasses= ...
    An example of our mapping :
              <class name="LoopbaanPeriode">
                   <extension vendor-name="kodo" key="jdbc-sequence-factory" value="native"/>
                   <extension vendor-name="kodo" key="jdbc-sequence-name" value="LOOPBAANPERIODESEQUENCE"/>
    <extension vendor-name="kodo" key="jdbc-class-ind-value" value="1"/>
    <field name="beginDatum"           persistence-modifier="persistent" />
    <field name="statuut" persistence-modifier="persistent" />
    <field name="loopbaan"                     persistence-modifier="persistent"/>
    </class>
    regards,
    David De Schepper.

    Hi David,
    When faced with a similar problem, I wrote my own subclass of DBDictionary
    (in my case actually a subclass of OracleDictionary), and plugged it into
    kodo using the kodo.jdbc.DBDictionary property. My class overrode the
    following methods:
    public String getFullName(Table, boolean);
    public String getFullName(Index);
    Then at runtime, these methods stuffed in the correct Schema name for
    certain tables and indexes, based on values yoinked from some user
    properties.
    Not sure if this will help or not in your case.
    Cheers!
    .droo.
    On 4/9/06 2:48 PM, in article [email protected], "David De
    Schepper" <David De Schepper> wrote:
    yes that works but that is not an option for us.
    We have an oracle schema for each developer on our team and don't want to
    hardcode it in our mapping file (for obvious reasons)
    FYI : kodo 4.0.1 does it correctly (generates PC52290.LOOPBAANPERIODESEQUENCE)
    but since i have problems doing the upgrade to kodo 4.0 (with as few code
    changes as possible) i'm going to have to advice my company not to do the
    upgrade.
    (In case you are intersted or have some time :
    http://forums.bea.com/bea/thread.jspa?forumID=500000029&threadID=600017073&mes
    sageID=600041994#600041994)

  • Function not found when package name exists with same name as schema name

    Hi all, any help would be appreciated :)
    I found an issue with pl/sql resolving a functions location when the db has a package name with the same as the db schema name.
    My example:
    -- arbitrary test function, not in any package
    create or replace FUNCTION testFunc
         inTest     IN VARCHAR2
    RETURN VARCHAR2
    AS
    BEGIN
    RETURN 'a';
    END;
    -- There is a package called "FM" with functions that are not referenced or used in this example and the db schema is "FM".
    -- The following PL/SQL fails with the message: "ORA-00904: "FM"."TESTFUNC": invalid identifier"
    select cursor (select testFunc('a') from dual) from dual;
    -- The following PL/SQL works:
    select * from (select testFunc('a') from dual);
    As mentioned the function testFunc is NOT in the FM package. This issue does not happen when I remove the FM package. So it seems like there is an issue with cursors calling functions when there exists any package with the same name as the db schema.
    Can anyone tell me why this happens and also what I can add to force the function that is not in any package to be referenced (without Oracle trying to look in the FM package)?
    DB: Oracle 11.2.0.2
    thanks!
    Paul

    Hi Paul,
    In general I would not advice to have schema and objects with the same name.
    Here is what documentation is saying here: How Name Resolution Differs in PL/SQL and SQL
    PL/SQL uses the same name-resolution rules as SQL when the PL/SQL compiler processes a SQL statement, such as a DML statement. For example, for a name such as HR.JOBS, SQL matches objects in the HR schema first, then packages, types, tables, and views in the current schema.
    PL/SQL uses a different order to resolve names in PL/SQL statements such as assignments and subprogram calls. In the case of a name HR.JOBS, PL/SQL searches first for packages, types, tables, and views named HR in the current schema, then for objects in the HR schema.As you can see above when using PL/SQL for your case Oracle searches first for packages, types, tables, and views named FM in the current schema, then for objects in the FM schema.
    And because a package FM is found it is raising an error due to the fact that the procedure could not be found in that package.
    I hope this clarify.
    Regards.
    Al

  • Using dbms_datapump package to export the schema with the schema name as pa

    Hi,
    I am using the pl/sql block to export schema using dbms_datapump package,Now I want to pass the scheme name as the parameter to the procedure and get the .dmp and .log files with the schema name included.
    CREATE OR REPLACE PROCEDURE export
    IS
    h1 number;
    begin
    h1 := dbms_datapump.open (operation => 'EXPORT', job_mode => 'SCHEMA', job_name => 'export1', version => 'COMPATIBLE');
    dbms_datapump.set_parallel(handle => h1, degree => 1);
    dbms_datapump.add_file(handle => h1, filename => 'EXPDAT.LOG', directory => 'DATA_PUMP_DIR', filetype => 3);
    dbms_datapump.set_parameter(handle => h1, name => 'KEEP_MASTER', value => 0);
    dbms_datapump.metadata_filter(handle => h1, name => 'SCHEMA_EXPR', value => 'IN(''CHECKOUT'')');
    dbms_datapump.set_parameter(handle => h1, name => 'ESTIMATE', value => 'BLOCKS');
    dbms_datapump.add_file(handle => h1, filename => 'EXPDAT%U' || to_char(sysdate,'dd-mm-yyyy') || '.DMP', directory => 'DATA_PUMP_DIR', filetype => 1);
    dbms_datapump.set_parameter(handle => h1, name => 'INCLUDE_METADATA', value => 1);
    dbms_datapump.set_parameter(handle => h1, name => 'DATA_ACCESS_METHOD', value => 'AUTOMATIC');
    dbms_datapump.start_job(handle => h1, skip_current => 0, abort_step => 0);
    dbms_datapump.detach (handle => h1);
    exception
    when others then
    raise_application_error(-20001,'An error was encountered - '||SQLCODE||' -ERROR- '||SQLERRM);
    end;
    Thank you in advanced
    Sri

    user12062360 wrote:
    Hi,
    I am using the pl/sql block to export schema using dbms_datapump package,Now I want to pass the scheme name as the parameter to the procedure and get the .dmp and .log files with the schema name included.
    OK, please proceed to do so
    >
    CREATE OR REPLACE PROCEDURE export
    IS
    h1 number;
    begin
    h1 := dbms_datapump.open (operation => 'EXPORT', job_mode => 'SCHEMA', job_name => 'export1', version => 'COMPATIBLE');
    dbms_datapump.set_parallel(handle => h1, degree => 1);
    dbms_datapump.add_file(handle => h1, filename => 'EXPDAT.LOG', directory => 'DATA_PUMP_DIR', filetype => 3);
    dbms_datapump.set_parameter(handle => h1, name => 'KEEP_MASTER', value => 0);
    dbms_datapump.metadata_filter(handle => h1, name => 'SCHEMA_EXPR', value => 'IN(''CHECKOUT'')');
    dbms_datapump.set_parameter(handle => h1, name => 'ESTIMATE', value => 'BLOCKS');
    dbms_datapump.add_file(handle => h1, filename => 'EXPDAT%U' || to_char(sysdate,'dd-mm-yyyy') || '.DMP', directory => 'DATA_PUMP_DIR', filetype => 1);
    dbms_datapump.set_parameter(handle => h1, name => 'INCLUDE_METADATA', value => 1);
    dbms_datapump.set_parameter(handle => h1, name => 'DATA_ACCESS_METHOD', value => 'AUTOMATIC');
    dbms_datapump.start_job(handle => h1, skip_current => 0, abort_step => 0);
    dbms_datapump.detach (handle => h1);
    exception
    when others then
    raise_application_error(-20001,'An error was encountered - '||SQLCODE||' -ERROR- '||SQLERRM);
    end;
    EXCEPTION handler is a bug waiting to happen.
    eliminate it entirely

  • JDeveloper - ESB / BPEL - JMS Adapter - prefix queue name with db schema

    When I use the JMS Adapter in ESB to create a new message queue producer or consume using database (AQ) I'm experiencing a problem when selecting the queue.
    I can browse the queue in the database but when I have selected the queue JDeveloper prefix it with the schema name owning the queue.
    Example:
    java:comp/resource/DocumentQueueResourceProvider/Queues/QUEUES.DOCUMENT_IMPORT_QUEUE
    Schema owner is QUEUES and the name of the queue is DOCUMENT_IMPORT_QUEUE.
    The problem is when I try to use it its unable to look up the queue and I have to manually remove the prefix from .wsdl file before deploying it - as with setting mcf.IsTransacted='false'.
    When the resource provider finds the queue and exposes it in the JNDI three it does it without the prefix.
    Question: How do I either:
    a) make the schema prefix be removed by JDeveloper
    b) make the resource provider prefix the queue name with the schema name.
    Anybody?
    Best regards
    Christian Damsgaard

    Try this:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsd:schema targetNamespace="http://www.yourcompany.com/msg"
    xmlns:tns="http://www.yourcompany.com/msg"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd"
    nxsd:encoding="ASCII" nxsd:stream="chars" nxsd:version="NXSD"
    elementFormDefault="qualified" attributeFormDefault="unqualified">
    <xsd:element name="rootnode" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="${eof}"/>
    </xsd:schema>
    This will result in a single node xml.
    Edited by: user472896 on Sep 22, 2010 10:29 AM

  • Need to know schema name and table name associated with a column-URGENT

    Hi folks,
    I need to know the schema name and the table name associated with a column. Though jdbc has the api to getTableName and getSchemaName, some database vendor like oracle does return empty upon call of mentioned methods. I found that oracle driver does not support that ……
    Can any one give me the solution? It is urgent. Or do you suggest any third pary jdbc driver which can provide those?
    Thanks
    Angelina

    Angelina,
    Your question has been discussed several times previously in this forum. Search this forum's archives for "getTableName". Oracle JDBC driver does not implement this (because "it is not feasible" -- according to Oracle).
    First of all, I would suggest that you could probably change your application's logic so that you would not need this functionality (but I guess that is not feasible either, right :-)
    Alternatively, you could try querying the Oracle database data dictionary.
    Good Luck,
    Avi.

Maybe you are looking for