Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: trick for database migration

Re: trick for database migration

From: A. Coskan Gundogar <gundogar_at_gmail.com>
Date: Tue, 13 Mar 2007 12:06:04 +0200
Message-ID: <d1f742de0703130306m33bdb010y14b4183f9a866e51@mail.gmail.com>


the problem is same as the problem below

http://www.dbforums.com/archive/index.php/t-1303793.html

The db we are migrating from is SYBASE. and developers did the design poorly :(

I think the only solution is removing the DBA prefix from all of the code

On 3/13/07, Nigel Thomas <nigel_cl_thomas_at_yahoo.com> wrote:
>
> A. Coskan Gundogar wrote:
> *We are migrating a database to oracle. We have a big problem that
> developers used the tables with DBA.XXXX aliases in the code. As you
> know DBA is a special word and cant be used like this in oracle.
>
> Does anyone know any trick rather than using "dba.xxx" alias for solving
> this problem without touching the code.
> *
> ----
>
> Can you please give an example of a problematic SQL statement? *DBA*itself is not a reserved word in Oracle:
>
> SQL> select * from v$version
> 2 /
> BANNER
> ----------------------------------------------------------------
> Oracle9i Enterprise Edition Release 9.2.0.7.0 - 64bit Production
> PL/SQL Release 9.2.0.7.0 - Production
> CORE 9.2.0.7.0 Production
> TNS for IBM/AIX RISC System/6000: Version 9.2.0.7.0 - Production
> NLSRTL Version 9.2.0.7.0 - Production
> SQL> select dba.dummy from dual dba
> 2 /
> D
> -
> X
>
> Do you mean the alias itself includes a period (".")? That doesn't work:
>
>
> SQL> select dba.x.dummy from dual dba.x
> 2 /
> select dba.x.dummy from dual dba.x
> *
> ERROR at line 1:
> ORA-00933: SQL command not properly ended
>
> You *can* (as you implied) hide the period within a case-sensitive alias
> protected by double quotes:
>
>
> SQL> select "dba.x".dummy from dual "dba.x"
> 2 /
> D
> -
> X
>
> But of course you would have to hack the code (in which case it would be
> easier to remove the DBA prefix).
>
> Regards Nigel
>

--
http://www.freelists.org/webpage/oracle-l
Received on Tue Mar 13 2007 - 05:06:04 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US