Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: select in oracle
Tim,
You problem is not case sensitivity.
In your first SQL statement, you are essentially saying:
SELECT * FROM some_table WHERE some_column = another_column; Oracle is telling you that another_column does not exist in some_table that you specified.
What you really want to say is:
SELECT * FROM some_table WHERE some_column = 'some_value'; In order for Oracle (or any other ANSI SQL compliant database) to understand that you are looking for some value and not another column, you must *literally* specify the value. You do this by putting that value in single quotes for character values.
HTH,
Brian
tim leung wrote:
>
> Hi,
> I have an oracle table like the following:
>
> SQL> describe platform;
> Name Null? Type
> --------------------------------------------
> PLATFORMID NUMBER(1)
> NAME VARCHAR2(128)
> DESCRIPTION VARCHAR2(255)
>
> But when I try to get a simple select statement. I get an erorr:
>
> SQL> select * from platform where name = Win32;
> Input truncated to 1 characters
> select * from platform where name = Win32
> *
> ERROR at line 1:
> ORA-00904: invalid column name
>
> I need a single quote:
> SQL> select * from platform where name = 'WIN32';
>
> Is that I must use a single quote? Is that oracle on NT is not case
> sensitive? Since I can use upper and lower case for table name.
> Thanks.
-- ======================================== Brian Peasland Raytheons Systems at USGS EROS Data Center These opinions are my own and do not necessarily reflect the opinions of my company! ========================================Received on Tue Jan 09 2001 - 08:07:16 CST
![]() |
![]() |