Re: Re: Imported table

"[email protected]" <[email protected]>
Newsgroups gmane.comp.db.oracle.devel
Message-ID <LYRIS-1796914-779196-2002.11.26-09.26.06--gcdod-oracle#[email protected]>
Maybey one more addition to the remark of Tom.

If you are importing tables from Excel another issue that is closely related to this problem may arise... 

Check if no space is added behind the table and/or column names..

This is not allways easy to see, but since in Excel a Space is easely typed it occurs. You can check it using this statement :

Select dump(table_name),table_name from all_tables;
Select dump(Column_name) from all_tab_columns where table_name = '[Your table]';

If in one of the dumps you see a character 32 add the end -> you'll probably also have encountered the above problem

X

------------------------
 "Oracle" <[email protected]> wrote:
------------------------
	
>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.unsub%%.
>



---
Change your mail options at http://p2p.wrox.com/manager.asp or 
to unsubscribe send a blank email to [email protected].
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.