Re: Imported table
"Thomas Gaines" <[email protected]>
| Newsgroups | gmane.comp.db.oracle.devel |
|---|---|
| Message-ID | <LYRIS-1796914-778889-2002.11.26-00.55.56--gcdod-oracle#[email protected]> |
Lily -
I find it hard to believe that your reference to the table names
with single quotes will actually ever work. For the time being,
I'll assume that you simply typed this message by hand and
threw in the single quotes even though they're not legal in
this context in Oracle.
Back to your problem. You're probably seeing the use of literal
column names in your Oracle table. The table could easily have
been created using syntax similar to this:
create table ce230_new ("personname" varchar2(10));
When you do a describe on this table, this is what you get:
SQL> desc ce230_new
Name Null? Type
----------------- -------- ------------
personname VARCHAR2(10)
Notice the lower case of the column name? A "normal" create
table statement will produce something different. See this:
create table ce231_new (personname varchar2(10));
SQL> desc ce231_new
Name Null? Type
----------------- -------- ------------
PERSONNAME VARCHAR2(10)
Notice the difference. To select the contents of the table
created in the first case, you must do this:
select "personname" from ce230_new;
It's pretty awkward, but that's the way that it is. I tend to
create my tables beforehand before importing any data. You
may want to do the same if this select statement is
too ugly for you.
Bye,
Tom
>
> Hi,
>
> I imported a table from excel to Oracle and the column name doesn't
> work. The table name has to be 'tablename'.
>
> Select personname from 'ce230_new' doesn't work,=20
> Select * from 'ce230_new' worked.
>
> Thanks,
>
> Lily
---
Change your mail options at http://p2p.wrox.com/manager.asp or
to unsubscribe send a blank email to [email protected].