Re: How to reference table/view that has "slashes" in its name!

From: Billy Verreynne <vslabs_at_onwe.co.za>
Date: 15 Aug 2003 02:05:35 -0700
Message-ID: <1a75df45.0308150105.48069d90_at_posting.google.com>


"Alex" <sh2222_at_yahoo.com> wrote in message

> Thank you all for your help. I've tried your suggestions (double quotations,
> caps, etc) but none seem to work. I think I'll try to find the person who
> created these objects and see if he has a solution.

Alex, the solution *is* double quotes. Simply make sure that you spell the object name _exactly_ as it is. When using double quotes, you are telling Oracle that the name is case sensitive. Is the case you enter correct? Maybe there are trailing spaces in the name?

What also could be a problem is the use of special characters (non-display ones). This will make accessing these table damn difficult. But you will still need double quotes.

Try the following. Get the *exact* name of these tables from the data dictionary itself:
  select
    table_name,
    length(table_name) LENGHT,
    dump( table_name) ACTUAL
  from user_tables
  order by 1

Check ACTUAL for the real length and real content of TABLE_NAME.

PS. Feel free to borrow my lead pipe to beat the crap out of the developer that uses non-standard table names. Slashes and case have _no_ place in table names - that should be reserved to no-case A..Z & 0..9 & underscore characters only.

PPS. The DBA From Hell Manual states that in such a case, the DBA has no choice but to rebuild such tables calling it "TABLE1", "TABLE2" with columns names as "C1", "C2" etc. This ensures that the developer never repeats his mistake.

--
Billy
Received on Fri Aug 15 2003 - 11:05:35 CEST

Original text of this message