Table name - Lower, upper case

Hi,
Thank you for reading my post.
1) I created a table:
CREATE TABLE radios(name varchar2(20), frequency varchar2(20));
Notice that the table name is lower case ("radios").
2) I added a constraint on the "name" column:
ALTER TABLE radios ADD CONSTRAINT name_pk PRIMARY KEY(name);
3) Now I want to list the existing constraints for the table "radios".
3.a) If I use the lower case table name, the result is empty:
SQL> SELECT constraint_name, constraint_type
FROM user_constraints
WHERE table_name = 'radios';
no rows selected
3.b) Now, if I use the upper case table name, I get what I am looking for:
SQL> SELECT constraint_name, constraint_type
FROM user_constraints
WHERE table_name = 'RADIOS';
CONSTRAINT_NAME C
NAME_PK P
Can you explain me that phenomenon?
I mean: I created a table name lower case so why does it work
only with the upper case formulation?
Do we have to create upper case table names consistently?
How do you create table names: do you create them upper case?
Thank you for your help.
Sincerely,
Lmhelp

All the object names are stored in UPPER case, unles you use double quotes to create them:
SQL> create table TesT_1 ( a number);
Table created.
SQL> create table "TesT_2" ( a number);
Table created.
SQL> select table_name from user_tables where table_name like '%1' or table_name like '%2';
TABLE_NAME
TEST_1
TesT_2
More details:
http://download.oracle.com/docs/cd/B28359_01/server.111/b28286/sql_elements008.htm
Edited by: SKU on 09-Dec-2009 02:42

Similar Messages

  • Converting mixed case table name to upper case

    I am migrating data from Access to Oracle and new tables and columns being created are in mixed case is there a way to convert all tablename or column name automatically.
    Also does the migration workbench handle the memo fields currently defined in my oracle database.

    If you want tables and columns to be created in Upper Case then make sure the Create ANSI-Compliance Names checkbox is unchecked in the options section.
    1.Open Workbench.
    2.Tools -> Options
    Memo fields are migrated to CLOB fields in Oracle.

  • How to Convert Lower Case name to Upper Case?

    Hi Friends,
    I have a requirement in my Application.
    When User gives Student's name in Lower Case, always convert to Upper case and send it to SAP(R/3).
    How is this possible?
    Can anyone help me out in this regard,if possible please provide some sample code so that i can understand a bit clearly.
    Thanks and regards,
    Chandrashekar.

    Check for java String methods.
    http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html
    String nameString = "Name".toUpperCase();
    or
    String nameString = nameString  = wdContext().currentContext().getName().toUpperCase() ;
    Regards,
    Sridhar

  • JDBC send data to oracle, oracle only accept column name in Upper case

    Hi experts,
    I am doing a scenario File --> XI --> JDBC,  JDBC send data to a Oracle 10g database, I have configured JDBC receiver to use XML-SQL format. in oracle database ,  table "EMPLOYEE" has a column "NAME", but when I send data to oracle using JDBC receiver, the column is "name", then XI complains
    " 'EMPLOYEE' (structure 'insert'): java.sql.SQLException: FATAL ERROR: Column 'name' does not exist in table 'EMPLOYEE'.
    can anyone help me to let oracle accpet column "name". I can't change colum in JDBC receiver from "name" to "NAME".
    Thanks a lot.

    <i>can anyone help me to let oracle accpet column "name"</i>
    Making Oracle case insensitive is not possible (in my opinion). By default all object names are stored in UPPER case in the rdbms dictionary.
    When XI searches for column name in Oracle, this search is case sensitive. So u have to configure accordingly.
    Regards,
    Prateek

  • Oracle 9 table names are not case sensitive

    Sorry about the trivial question, but I noticed that when I am creating table in Oracle their names is always upper case.
    Example:
    CREATE TABLE MyTable (i NUMBER(5))
    CREATE TABLE MYTable (i NUMBER(5))
    CREATE TABLE MyTABLE (i NUMBER(5))
    CREATE TABLE MyTablE (i NUMBER(5))
    it is the same table. Is it true that Oracle cannot create tables with names case sensitive, or I am doing something wrong.
    Any help

    You can create case sensitive table with table names enclosed in quotes.
    SQL> create table sample(id number);
    Table created.
    SQL> select table_name from user_tables where upper(table_name)='SAMPLE';
    TABLE_NAME
    SAMPLE
    SQL> create table "sample"(id number);
    Table created.
    SQL> select table_name from user_tables where upper(table_name)='SAMPLE';
    TABLE_NAME
    SAMPLE
    sample
    SQL>

  • Middle name to upper case

    Hi,
    I have an issue in my program can someone tell me how to approach the solution ?
    Ex-
    TRANSLATE l_first(1) TO UPPER CASE.
    TRANSLATE l_last(1)  TO UPPER CASE
    First Name            Last Name
    sanjay  kumar        yadav
    current o/p is
    Sanjay kumar  Yadav
    Required O/p is
    Sanjay Kumar Yadav
    Please let me know.
    Kind regards
    Sanjay

    Man for Sanajy Kumar Seems K is in SMALL correct??
    See its the data problem of any way to handle it manually
    You need to use
    split firstname into f1 f2 at space.
    now take F2 and write as Translate f2 at upper case.
    now CLEAR FIRSTNAME.
    CONCATENATE F1 F2 INTO firstname seperated by space.
    satish

  • How to CHECK WHETHER LOWER CASE OR UPPER CASE  IN CUSTOM TABLE

    Dear Friends,
                     I have a requirement where from  the flat file  i have collected into the internal table is as below :
      IDNo.     Name     Date      Location   Designation  Dept
      101       raja      4/12/2007  Delhi      manager      HR
      102       james    4/12/2007  Delhi      clerk          HR
    now iam checking against my custom table where iam   if the designation for the employee name already exists then i shouldnt modify/update the custom table that record
      now iam facing a problem where is the flat file is always having the Lower Case only ,
    as per the scenario  if my custom table already have the employee name i shouldnt modify/update i.e i shouldnt overwrite,
    this scenario is working but it is failing in the case
    by chance in the Custom table the employee name or designation is in Upper Case  the condition where iam checking in the code  is failing as the flat file data coming into the internal table is having always lower Case.
    So could any one please let me know how i should check in my custom table whether iam having upper case or lower case and how can i make it lower case ?
    because iam able to manage in the case where if the flat file data coming in Upper case i can check before only by
    using Translate to lower case . how i unalbe to  check for the data coming from the Custom table if  in Uppercase , so i want to change that to lower case then checking my condition whether that data already exists in my custom table before modifying the data coming from the flat .
    because the condition is failing when the data in the custom table is in upper case and the Flat file data is in lower case.
    please help how i can check for the data in the Custom table is in upper case and then change it to lower case.
    Regards
    Madhuri.

    Hi Madhuri,
    Translate both data in your flat file & custom table to lowercase before comparing them. With that, you're able to identify if there's a differences in for both data.
    If you're putting data that is pulled from custom table, what you can do is after selecting/reading the data, translate to lowercase or uppercase (whichever you prefer) but make sure if you translate to lowercase, your data in the flat file must be lowercase to and vice versa.
    Happy doing !!..
    Regards,
    Loo

  • Conversation lower case to upper case by default not wanted

    Hi,
    Oracle converts lower case table names and columns names to upper case by default. To keep lower case letters names must be quoted. This "work around" is not acceptable.
    Is there a way to change this behavior either for the database or for a session?
    Thanks

    Easy answer. We are migrating from sybase ASE to
    oracle. Sybase supports mixed lower/upper case by
    default.Which is a proprietary behavior. After all these years of accusing Oracle of not conforming to standards, when they do (or come close) it bites them. <g>
    Users are familiar with reading column names like
    "RxCellsHec0Clp0" instead of "RXCELLSHEC0CLP0".
    Yes, there are users working directly with sql.If the users are used to putting the column name in double-quotes, then creating the table with identifiers in double-quotes will conform to the expected behaviour. That simply means that each and every reference to the table requires double-quote around the identifiers.
    And it is quite impossible to get them changing all their queries
    from select RxCellsHec0Clp0 from ...
    to select "RxCellsHec0Clp0" from ...One alternative is to wrap every table (of concern) with a view. My thought would be to leave the table with upper case identifiers, have the view with mixed-case identifiers, and use private synonyms to redirect the user to the view.
    The assumptions are
    1) user-oriented security is in place
    2) users use the quoted-identifier syntax

  • How to convert lower case letter to upper case letters

    hai all,
    How to convert lower case letter to upper case letters??
    Thanks & Regards,
    suresh

    Hi Suresh,
    Include ALL_CAPITAL in the RSKC Tx.
    Also try this code in your Transfer rule,
    TRANSLATE TRAN_STRUCTURE-(Info Object Name) TO UPPER CASE.
    RESULT = TRAN_STRUCTURE-(Info Object Name)
    Hope this solves................

  • Table name for Case Management

    Can anyone please help me out with all the required table names for implementing CASE MANAGEMENT....... the table information which contains status, Texts, Description,activities, Bus.transactions,priorities,and etc of Cases.....

    Hi Daniel,
    First of all, you need to create status Profile, Text Profile, Attribute Profile etc.,
    Later you have to create a CASE TYPE.
    while creating a Case Type you will mention the above created Status, Text and Attribute Profile names.
    Later while reating the Case you need to choose this particular Case Type which you have created.
    Because, Case is based on CaseType.
    Steps for creating Status, Text , Attribute Profiles will be available in the IMG Activity. Do refer.
    Regards,
    Eswari.

  • Store entries in a table in UPPER CASE only

    Is there any ay where we can ensure that entries in a character type field in a table is always stored in the upper case?

    Leave lowercase checkbox in domain blank.
    However this will not make your entire table filled in upper case, point fields to the data element and the data element to the domain, in all the domains uncheck the lowercase box.

  • Create user for CPS in _ UPPER CASE LETTERS _ if using JSM on SolMan

    only create users for CPS in UPPER CASE LETTERS if using JSM on SolMan
    Dear CPS Admins,
    If you plan to use Job Scheduling Management (JSM) on SAP Solution Manager together with CPS by Redwood please always create any users in CPS only with upper case letters to avoid issues in the communication between SolMan and CPS.
    The user creation for CPS is done in the UME (Java user administration, alias /useradmin).
    Actually the CPS user itself is only created in CPS during the first logon.
    Both CPS and the Java UME are case sensitive. So you can create users in uppercase, lowercase or mixed letters. But of course the system does still not allow duplicate names. So you can either create MUELLERP, MuellerP or muellerp - but not multiple of them.
    Now, if the SolMan communicates with CPS for Job Scheduling, the actual user name is taken in some kind of a "trusted RFC like" way and checked on the CPS system connected to the SolMan. If the current SAP user does not exist on CPS no activities are possible, neither in read mode (read existing CPS jobs) nor in write mode (change existing jobs or create new ones).
    Unfortunately the Solution Manager transmits the current user name to CPS only in upper case letter. So if the CPS user was not created in UPPERCASE letters in CPS the communication will fail. Therefore, think about creating CPS users in UME only in UPPERCASE letters. Changing this later is difficult to impossible.
    Best regards,
    Peter

    hi,
    I tried to reproduce your issue but I was not able to create a UME user with lower case letters.
    UME automatically converted the user name into upper case after saving. So even if I enter "cps" as user name UME stored the user name as "CPS".
    (maybe that happend because of the existing SU01-UME integration in our SolMan system)
    If UME would be case sensitive I would expect that it is possible to create the user "CPS", "cPs" and "cps".
    Regarding the SolMan-CPS connectivity:
    Transaction SU01 allows only upper case letters (in user name and alias). Since you're starting from an ABAP system only user names with upper case letters are supported. It's a technical constraint of the ABAP user management that user names consist of upper case letters only.
    Kind regards,
    Martin

  • Converting Table Names to Uppercase

    I am converting SQL Server 7 or 8i. My SQL Server database has tables that are mixed case. Is there any way in the Migration Workbench to force the tables to be upper case?

    Hi,
    By default all Oracle Object names are upper case unless that are enclosed by double quotes.
    John

  • Dbms_xmlgen = tags in upper case

    hi everyone,
    I'm using the dbms_xmlgen package in order to generate XML from relational data. everything is working fine, but I'm getting back the tag names in upper case only. since my schema document defines all element names in lower case, it would be really important to me, to convert them ... is this somehow possible?
    so that's the case:
    <RESULT> </RESULT>
    I would need:
    <result> </result>
    I know that you can set the name for the Row and RowSet tag, but that's not enough.
    Hope, someone can help ;-)

    We have not focused on DBMS_XMLGEN performance or functionality since 9.2.x. All of our develepment efforts are now focused on the SQL/XML operators.
    Statement of Direction?
    By the way on OTN (http://www.oracle.com/technology/tech/xml/xmldb/index.html), section XMLDB, some usefull whitepapers can only be found under "previous releases" (http://www.oracle.com/technology/tech/xml/xmldb/index10_2.html), especially the topics in
         Mastering XML DB Storage in Oracle Database 10g Release 2 (PDF) Mar 2005
         Mastering XML DB Repository in Oracle Database 10g Release 2 (PDF) Mar 2005
         Mastering XML DB Queries in Oracle Database 10g Release 2 (PDF) Mar 2005
         Mastering XML Generation in Oracle Database 10g Release 2 (PDF) Mar 2005
    which is in some respect, still valid information...? If so maybe they could also be place on the 11g page...?
    Message was edited by:
    Marco Gralike

  • Field symbols as Table name and in where condition in a select statement

    Hello All,
    I have a scenario where I need to get user input on table name and old field value and new field value. Then based on user input, I need to select the record from the database. The column name for all the tables in question is different in the database, however there data type is the same and have same values.
    I am not able to use a field symbol for comparing the old field value to fetch the relevant record in my where clause.
    I cannnot loop through the entire table as it has 10 millilon records, please advice on how to add the where clause as field symbol as the table name is also dynamically assigned.
    Here is my code:
    DATA: TAB       LIKE SY-TNAME,
          TAB_COMP1 LIKE X031L-FIELDNAME,
          TAB_COMP2 LIKE X031L-FIELDNAME,
          NO_OF_FLD TYPE N.
    DATA: BEGIN OF BUFFER,
            ALIGNMENT TYPE F,
            C(8000)   TYPE C,
          END OF BUFFER.
    FIELD-SYMBOLS: <WA>   TYPE ANY,
                  <COMP1> TYPE ANY,
                  <COMP2> TYPE ANY.
    GET TABLE NAME GIVEN BY USER IN LOCAL VARIABLE
      TAB = TAB_NAME.
    CREATE FIELD NAME BASED ON THE TABLE NAME ENTERED.
      CASE TAB_NAME.
      WHEN 'OIUH_RV_GL'.
          KEY FIELD
            TAB_COMP1  = 'GL_GL_SYS_NO'.
            NO_OF_FLD  = 1.
      WHEN 'OIUH_RV_OPSL'.
          KEY FIELD
            TAB_COMP1  = 'OPSL_GL_SYS_NO'.
            NO_OF_FLD  = 1.
      WHEN 'OIUH_RV_OTAX'.
          NOT THE ONLY KEY FIELD
            TAB_COMP1  = 'OTAX_GL_SYS_NO'.
            TAB_COMP2  = 'OTAX_TAX_POS_NO'.
            NO_OF_FLD  = 2.
      WHEN 'OIUH_RV_GTAX'.
          NOT THE ONLY KEY FIELD
            TAB_COMP1  = 'GTAX_GL_SYS_NO'.
            TAB_COMP2  = 'GTAX_TAX_POS_NO'.
            NO_OF_FLD  = 2.
      WHEN OTHERS.
            EXIT.
      ENDCASE.
    SET FIELD SYMBOL WITH APPROPRIATE TYPE TO BUFFER AREA.
    ASSIGN BUFFER TO <WA> CASTING TYPE (TAB).
    How to add where clause and remove the if condition in the select -- endselect
    SELECT * FROM (TAB) INTO <WA>. 
      ASSIGN COMPONENT TAB_COMP1 OF STRUCTURE <WA> TO <COMP1>.
      IF NO_OF_FLD = 2.
        ASSIGN COMPONENT TAB_COMP2 OF STRUCTURE <WA> TO <COMP2>.
      ENDIF.
      IF <COMP1> = OLD_SYS_NO.
        code for updating table would come here
          WRITE: 'MATCH FOUND'.
          EXIT.
      ENDIF.
    ENDSELECT.
    Please advice. Thanks much.
    Edited by: Shipra Jhunjhunwala on Jul 22, 2009 1:33 PM
    Edited by: Shipra Jhunjhunwala on Jul 22, 2009 1:34 PM
    Edited by: Shipra Jhunjhunwala on Jul 22, 2009 1:35 PM

    1. Create single column table for holding field name depending on the table entered.
    2. Take input from user: for e.g. table_name
    3. Using case load single column table with required fields
       for e.g.
      CASE TAB_NAME.
       WHEN 'OIUH_RV_GL'.
             Append 'GL_GL_SYS_NO' to KEY_FIELD --> KEY_FIELD is the single line internal table as mentioned in step 1.
       WHEN 'OIUH_RV_OPSL'.
             Append 'OPSL_GL_SYS_NO'.
       WHEN 'OIUH_RV_OTAX'.
             Append 'OTAX_GL_SYS_NO' to KEY_FIELD.
               APPEND 'OTAX_TAX_POS_NO' to KEY_FIELD.
       WHEN 'OIUH_RV_GTAX'.
             Append 'GTAX_GL_SYS_NO' to KEY_FIELD.
               APPEND 'OTAX_TAX_POS_NO' to KEY_FIELD.
       WHEN OTHERS.
          EXIT.
       ENDCASE.
       Now depending on the table name you have required column ready
    4. Create dynamic internal table using following sudo code
       Fill the fieldcatlog using the single column field table and DD03L table, See what all columns from DD03L you want to fill in field catlog table
       loop at internal table with all the fields.
        move it to field catalog.
        append field catalog.
       endloop.
    5. Pass this field catalog table to static method create_dynamic_table method
       DATA table TYPE REF TO DATA. --> data object for holding handle to dynamic internal table.
       call method cl_alv_table_create=>create_dynamic_table
       exporting
          it_fieldcatalog = fieldcatalog_tab
       importing
          ep_table = table.
    6. Now assign table reference to field symbol of type table.
       ASSIGN table->* to <field-tab>.
    7. Also create work area <field-wa> using refrence of table.
       create data object wa LIKE LINE OF <field-tab>.
       ASSIGN wa->* to <field-wa>.
    8. Also define field symbol for field name.
       for e.g. <field_name>
    4. Dynamic internal table is ready
    5. Now execute the select statement as follows:
       SELECT (KEY_FIELD)
         INTO <ITAB> --> created dynamically above
          FROM (TABLE_NAME)
         WHERE (WHERE).  --> WHERE is single line internal table having line type of CHAR72. So for every old value there will be one line
         Where condition is same as like we give in static way only difference in this case it will stored in internal table line wise.
        In this case you need to append all your where condition line by line in to WHERE.     
    5. To fill this dynamic internal table using ASSIGN COMPONENT <Comp_number> OF STRUCTURE <field-wa> TO <field-name>
       So in this case if first field of structure STRUCT1 is user_id then sudo-code will be
       loop at internal table containing list of fields into field_wa --> single column field table
           ASSIGN COMPONENT field_wa OF STRUCTURE <field-wa> TO <field>. "Here field_wa is wa area for single column internal table holding all the fieldnames.
           Now <field-name> points to user_id field. Move some value into it as nornally we do with variables.
           Move <your_new_value> to <field-name>. --> Assign new value
            or
            <field-name> = <your_new_value>.
       Endloop.
    6. After completing all the fields one row will be ready in <field_wa>.
       APPEND <field_wa> to <field_tab>.
    Hope this helps you.
    Thanks,
    Augustin.

Maybe you are looking for