Subject: Re: how to solve it?
Newsgroups: comp.databases.oracle.misc
References: <33C1714B.331B@platinum.com>
Organization: InterAccess, Co. - Chicagoland's Full Service Internet Provider
Reply-To: akaplan@interaccess.com
Distribution: 

Jean Xu (xu@platinum.com) wrote:
: I try to select some records from a table as following:
: 
: SELECT * from file
: where filename='file.sql';
: 
: It did not return any rows(there is one record satisfied this
: condition). I think the reason is the dot(.) in the filename. Can
: anybody tell me how to make it work?
: Thanks!

Jean,

The problem is not the dot in the filename. A few characters such as ' and % are
special cases, but not a dot/period.

First, you cannot have a table called "FILE". File is a reserved word, and
tables cannot be reserved words.

If your table is legitimate and you still have problems, just make sure that
there are no trailing spaces, and that the case of the text is correct.

Try the following:

SQL> select length(filename), filename from file;

Length(filename)	filename
----------------	--------------
10			file.sql
5			x.sql

2 records selected.



Notice that with the file.sql, the length is 10 when it should be 8.  This means
that there are two spaces appended to the filename and you must clean up your
data.

Best of luck,

-Ari Kaplan
Independent Oracle DBA Consultant

<-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><->
<-> For 70+ technical tips, visit my Web Page:                    <->
<->                                                               <->
<->              www.arikaplan.com                                <->
<->                                                               <->
<->             email: akaplan@interaccess.com                    <->
<-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><->

Back to Ari Kaplan's Home Page REF="../index.htm">Back to Ari Kaplan's Home Page