Hi Venkat,
My recommendation in this case is generally as follows: Make all
identifiers in both Oracle and SQL Server "Case Sensitive" in your DDL, by
quoting them already in the DDL statement. Obviously, they will then need
to be quoted the same way between SQL Server and Oracle.
I understand that you're working with a legacy system where this may not
always be possible. jOOQ allows for specifying four different strategies of
SQL rendering in Settings.renderNameStyle:
<simpleType name="RenderNameStyle">
<restriction base="string">
<!-- Render object names quoted, as defined in the database. Use this
to stay on the safe side with case-sensitivity and special
characters. For instance:
Oracle : "SYS"."ALL_TAB_COLS"
MySQL : `information_schema`.`TABLES`
SQL Server: [INFORMATION_SCHEMA].[TABLES] -->
<enumeration value="QUOTED"/>
<!-- Render object names, as defined in the database. For instance:
Oracle : SYS.ALL_TAB_COLS
MySQL : information_schema.TABLES
SQL Server: INFORMATION_SCHEMA.TABLES -->
<enumeration value="AS_IS"/>
<!-- Force rendering object names in lower case. For instance:
Oracle : sys.all_tab_cols
MySQL : information_schema.tables
SQL Server: information_schema.tables -->
<enumeration value="LOWER"/>
<!-- Force rendering object names in upper case. For instance:
Oracle : SYS.ALL_TAB_COLS
MySQL : INFORMATION_SCHEMA.TABLES
SQL Server: INFORMATION_SCHEMA.TABLES -->
<enumeration value="UPPER"/>
</restriction>
</simpleType>
See some more details here:
http://www.jooq.org/xsd/jooq-runtime-3.1.0.xsd
Please let me know if these features sufficiently cover your use-case, or
if you might run into other problems in edge-cases, e.g. Oracle
UNDERSCORE_UPPER_CASING, vs. SQL Server's NoUnderscorePascalCasing, i.e.
when casing isn't the only difference.
Cheers
Lukas
2013/7/2 Venkat Sadasivam <[email protected]>
> I generated classes from SQL Server database and tried to execute them
> against oracle database but it says no table/view exists.
>
> When generating from SQL Server it returns the actual table name in mixed
> case whereas oracle expect the table names in upper case when enclosed in
> double quote.
>
> select * from "Schema"."Employee" -- this will work for SQL Server but for
> oracle schema name and table name should be upper case as below
>
> select * from "SCHEMA"."EMPLOYEE"
>
> Are there anyway to upper case the table names for Oracle?
>
> --
> You received this message because you are subscribed to the Google Groups
> "jOOQ User Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>
--
You received this message because you are subscribed to the Google Groups "jOOQ
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.