Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Where as a column name
Try using double quote like this, so the statement will look like:
select parent_name, "WHERE" from v$latch_misses
Note:
You must be careful if using double quote for field name,
cause it's case sensitive, so it's different between "where"
and "WHERE"
Kuncoro
Jakarta, Indonesia
<bchorng_at_my-deja.com> wrote in message news:7qhkac$c1q$1_at_nnrp1.deja.com...
> There is a column named " where " in v$latch_misses in 8.0.5.
> I tried the following query and it failed, because Oracle mistakes
> the column " where " for the where clause and takes it as syntax error
> although this query is absolutely legal.
>
> I consider this an Oracle bug.
>
> Does anybody know if there is any escape key for
> SQL ?
>
> -Bass Chorng
>
> ****************************************************************
>
> desc v$latch_misses
> Name Null? Type
> ------------------------------- -------- ----
> PARENT_NAME VARCHAR2(50)
> WHERE VARCHAR2(64)
> NWFAIL_COUNT NUMBER
> SLEEP_COUNT NUMBER
> WTR_SLP_COUNT NUMBER
> LONGHOLD_COUNT NUMBER
>
> select parent_name, where from v$latch_misses
> where rownum <= 100;
>
> select parent_name,where from v$latch_misses
> *
> ERROR at line 1:
> ORA-00936: missing expression
>
>
>
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.
Received on Tue Aug 31 1999 - 21:53:32 CDT
![]() |
![]() |