0

I successfuly migrate mysql to oracle. But the only problem is case sensitive on table name and fieldname.Some pages in web said go to tools and option in sql developer and tick the ansi but i cannot find it. On oracle website forum said it part of migration . Anybody had new version of sql developer and migrate from mysql ?

E.g

calendarColor become CALENDARCOLOR

6
  • Please show us the real SQL statements that you are running. Ideally show use the CREATE TABLE statement as well (just copy that CREATE table from SQL Developer it is displayed there) Commented Sep 7, 2011 at 6:44
  • PROMPT Creating Table calendarcolor ... CREATE TABLE calendarcolor ( calendarColorId NUMBER(10,0) NOT NULL ); PROMPT Creating Primary Key Constraint PRIMARY_3 on table calendarcolor ... ALTER TABLE calendarcolor ADD CONSTRAINT PRIMARY_3 PRIMARY KEY ( calendarColorId ) ENABLE ; Commented Sep 7, 2011 at 7:15
  • seem generate code is not uppercase weird.. have to check back on the generated code Commented Sep 7, 2011 at 7:16
  • If no quotes are used in the CREATE TABLE, then the table is stored in uppercase internally and you don't need to use quotes anywhere Commented Sep 7, 2011 at 8:06
  • 1
    Simply don't use any quoting ever. Commented Sep 7, 2011 at 8:28

2 Answers 2

1

I really don't see how this is a problem. Since Oracle's objects are case-insensitive by default, you can continue to query them using SELECT * FROM calendarColor.

If you need them to be case sensitive, use quotes, like:

CREATE TABLE "calendarColor" ( ... );

SELECT * FROM TABLE "calendarColor";

See also: Schema Object Names and Qualifiers

Sign up to request clarification or add additional context in comments.

3 Comments

[quote]Error starting at line 1 in command: select * from "calendarColor" Error at Command Line:1 Column:14 Error report: SQL Error: ORA-00942: table or view does not exist 00942. 00000 - "table or view does not exist" *Cause: *Action:[/quote]
If you created the table without using quotes (ie: case-insensitive), you have to refer to it without quotes (or if you do use quotes, use all uppercase letters). Also please don't use BBCode here. It's fugly and SO doesn't support it.
hmm.. i not generate the code. it generate by sql developer.. Hmm.. seem you don't used it..better not answer...
1

If the table was created using

CREATE TABLE calendarcolor ( calendarColorId NUMBER(10,0) NOT NULL ); 

then the table name is stored in uppercase internally. When you run a statement like this:

select * from "calendarColor" 

then you are telling Oracle: The table name should be treated case-sensitive but as there is not table named calenderColor, only one named CALENDARCOLOR your statement fails.

The fix is very easy: remove the quotes and change the select to

select * from calendarColor

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.