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: Nigel Thomas <nigel_cl_thomas_at_yahoo.com>
Date: Tue, 13 Mar 2007 02:52:50 -0700 (PDT)
Message-ID: <971791.89094.qm@web58711.mail.re1.yahoo.com>

  1. 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 - 04:52:50 CDT

Original text of this message

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