BUG: Export DDL and Data fails for mixed case table/column names
627000Mar 6 2008 — edited Mar 26 2008Hi there,
I have found a bug in SQL Developer. See details below.
Description:
When "Export DDL and Data) function is used on a table/columns not named in UPPERCASE, sql generated by SQL Developer is invalid.
Steps to reproduce:
- open SQL Developer, connect to DB
- make a table named "lowerCase" (in double quotes, so it won't be automatically changed to capital letters)
- you may also add some columns, for example "lowerCol1", "UpCol2", ALLUPCOL3
- add some data rows to the table
- choose Tools -> Export DDL and Data
- check exporting of tables and data, on "filter" tabs choose your "lowerCase" table
- press "Apply"
Error:
Generated SQL contains invalid INSERTs: mixed-case table and columns are referenced without obligatory double quotes, which yields an error when generated script is executed (see below, relevant line is underlined)
--------------------------------------------------------
-- DDL for Table lowerCase
--------------------------------------------------------
CREATE TABLE "DBO_HT"."lowerCase"
( "lowerCol1" VARCHAR2(100),
"UpCol2" VARCHAR2(100),
"ALLUPCOL3" VARCHAR2(100)
) ;
---------------------------------------------------
-- DATA FOR TABLE lowerCase
-- FILTER = none used
---------------------------------------------------
-- INSERTING into lowerCase
Insert into lowerCase (lowerCol1,UpCol2,ALLUPCOL3) values ('lc','uc','auc');
---------------------------------------------------
-- END DATA FOR TABLE lowerCase
---------------------------------------------------
Remarks
SQL Developer: version 1.2.1, build MAIN-32.13
Oracle DBs: 9.2 & Express
OS: Windows 2000 Professional
If you need any more details/testing, let me know. I'd really appreciate a quick patch for this issue...
Alternatively, do you know of any other simple way of copying a single database (it's called a schema in Oracle, right?) from one computer to another? Possibly something so simple like detaching->copying->reattaching mdf (data) files in SQL Server... I thought that this "Export DDL&Data" function will do, but as you can see I couldn't use it.
I just need a simple solution that works - one operation on source to stuff, get the resulting files to other computer and one operation to have it running there... I think that such scenario is very basic, yet I just can't achieve it and I am simply not allowed to spend more time on it (read: our test project fails, my company rejects my "lobbying" and stays with MSSQL :/ )
Thanks a lot & bye