473,387 Members | 1,516 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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

I'm new to Oracle, so this question may sound silly. I have been given a
list of Oracle tables (they may be views, I'm not sure) that are available
to me. I can run simple SQL select statements against most of them in SQL
Plus. But some of them have "slashes" in their names such as /XYZ/CUSTOMERS
or /XYZ/ADDRESSES . When I try to use the name the way it's listed (with
slashes) I get an error. I even tried replacing the slashes with dots, but
that didn't work either. My question is how do I reference a table/view (in
a SQL select statement for instance) that has slashes in its name. I'm not
sure if this is relevant, but I think the Oracle database runs on a Unix
box. Thanks in advance.

Alex
Jul 19 '05 #1
7 22067
TC
"/XYZ/ADDRESSES"

/tc

"Alex" <sh****@yahoo.com> wrote in message
news:9y********************@twister.austin.rr.com. ..
I'm new to Oracle, so this question may sound silly. I have been given a
list of Oracle tables (they may be views, I'm not sure) that are available
to me. I can run simple SQL select statements against most of them in SQL
Plus. But some of them have "slashes" in their names such as /XYZ/CUSTOMERS or /XYZ/ADDRESSES . When I try to use the name the way it's listed (with
slashes) I get an error. I even tried replacing the slashes with dots, but
that didn't work either. My question is how do I reference a table/view (in a SQL select statement for instance) that has slashes in its name. I'm not
sure if this is relevant, but I think the Oracle database runs on a Unix
box. Thanks in advance.

Alex

Jul 19 '05 #2
"Alex" <sh****@yahoo.com> wrote
I'm new to Oracle, so this question may sound silly. I have been given a
list of Oracle tables (they may be views, I'm not sure) that are available
to me. I can run simple SQL select statements against most of them in SQL
Plus. But some of them have "slashes" in their names such as /XYZ/CUSTOMERS
or /XYZ/ADDRESSES . When I try to use the name the way it's listed (with
slashes) I get an error.

SQL> create table "ABC/def" ( x char(1) );

Table created.

SQL> select * from "ABC/def";

no rows selected
--
Billy
Jul 19 '05 #3
Hi Alex,
Try this :

/XYZ/CUSTOMERS -----------> "/XYZ/CUSTOMRRS"

like wise all..
to remove meaning of special characters use " "..but write other
characters in capitals only ..

Prashant.
"Alex" <sh****@yahoo.com> wrote in message news:<9y********************@twister.austin.rr.com >...
I'm new to Oracle, so this question may sound silly. I have been given a
list of Oracle tables (they may be views, I'm not sure) that are available
to me. I can run simple SQL select statements against most of them in SQL
Plus. But some of them have "slashes" in their names such as /XYZ/CUSTOMERS
or /XYZ/ADDRESSES . When I try to use the name the way it's listed (with
slashes) I get an error. I even tried replacing the slashes with dots, but
that didn't work either. My question is how do I reference a table/view (in
a SQL select statement for instance) that has slashes in its name. I'm not
sure if this is relevant, but I think the Oracle database runs on a Unix
box. Thanks in advance.

Alex

Jul 19 '05 #4
"Alex" <sh****@yahoo.com> wrote:
I'm new to Oracle, so this question may sound silly. I have been given a
list of Oracle tables (they may be views, I'm not sure) that are available
to me. I can run simple SQL select statements against most of them in SQL
Plus. But some of them have "slashes" in their names such as /XYZ/CUSTOMERS
or /XYZ/ADDRESSES . When I try to use the name the way it's listed (with
slashes) I get an error. I even tried replacing the slashes with dots, but
that didn't work either. My question is how do I reference a table/view (in
a SQL select statement for instance) that has slashes in its name. I'm not
sure if this is relevant, but I think the Oracle database runs on a Unix
box. Thanks in advance.

Alex

In addition to all the good advice you have been given about using " " to enclose the badly formed name, speak to the DBA who
created such a non-compliant piece of S*** .
There is no reason to make users jump through hoops because of a lack of Oracle knowledge - If it was a purchased app that
did it, ask for your money back - who knows what other non-standard stuff may be hidden in the coding.

Jul 19 '05 #5
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.

Thanks again,

Alex

"Alex" <sh****@yahoo.com> wrote in message
news:9y********************@twister.austin.rr.com. ..
I'm new to Oracle, so this question may sound silly. I have been given a
list of Oracle tables (they may be views, I'm not sure) that are available
to me. I can run simple SQL select statements against most of them in SQL
Plus. But some of them have "slashes" in their names such as /XYZ/CUSTOMERS or /XYZ/ADDRESSES . When I try to use the name the way it's listed (with
slashes) I get an error. I even tried replacing the slashes with dots, but
that didn't work either. My question is how do I reference a table/view (in a SQL select statement for instance) that has slashes in its name. I'm not
sure if this is relevant, but I think the Oracle database runs on a Unix
box. Thanks in advance.

Alex

Jul 19 '05 #6
"Alex" <sh****@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
Jul 19 '05 #7

Billy Verreynne wrote:
"Alex" <sh****@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.

<snipped>


You are correct of course ... but the real solution is to find the person that
came up with this naming and send them back to take Computer Science 100. There is
no excuse for using slashes in object names.

--
Daniel Morgan
http://www.outreach.washington.edu/e...ad/oad_crs.asp
da******@x.washington.edu
(replace 'x' with a 'u' to reply)
Jul 19 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: SharkFOA | last post by:
Hi, Hoping someone can help. I have created a pivot table and launch it via a command button. Unfortunately, it opens in form view and not in pivot table view. I have opened the form in design...
4
by: Brian Andrus | last post by:
Ok. I upgraded to MS Access 2003 recently and now I am having great heartache. In Access 2002, when I opened a table to view the data, there were wonderful little "plus" signs that I could click...
8
by: Gerry Abbott | last post by:
Could someone please tell me is there a simple way to refresh a table open in standard table view, without having to either close and re-open, or open in design than back to datasheet view. Many...
1
by: Kevin Myers | last post by:
Hello, I'm an experienced application developer in some languages (including various SQL dialects), but have very little experience with MS Access or VBA, and am having trouble figuring out how...
2
by: Charles Wilt | last post by:
I have a IBM iSeries (aka AS-400) running v5r3 of OS/400 that I access via a linked server from SQL Server 2000. The following select works fine: select * from...
0
by: pbo | last post by:
Hello, If anyone knows a trick...thanks Philippe I want to create a table view on AS/400 which have a column which is not referenced in a table. With the AS/400 SQL gui, I create the table...
2
by: migrant_lad | last post by:
form to view in pivot table view is based on query. form default view is pivot table and will function when the form is opened directly. The problem is that when the form is opened from a control...
6
by: Alex | last post by:
I'm new to Oracle, so this question may sound silly. I have been given a list of Oracle tables (they may be views, I'm not sure) that are available to me. I can run simple SQL select statements...
1
by: Arielle | last post by:
Problem: I have a few related tables that collects information about a given publication. The information collected varies based on the type of collection and is stored in a few different tables. ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.