문제

I am having problem with my query...

This one works:

  select name, bday, address, dbms_random.value(1, 100) as joker
    from employee 
order by joker asc

But when I try to get what I want using either the 'where' and group/having clause, I am getting a ora-00904 (invalid identifier) ERROR..

e.g.

  select name, bday, address, dbms_random.value(1, 100) as joker 
    from employee 
   where joker>5 
order by joker asc

  select name, bday, address, dbms_random.value(1, 100) as joker
    from employee 
group by name, bday, address 
  having joker > 5 
order by joker asc 

What could be my problem here and how can i query using the joker column?

도움이 되었습니까?

해결책

try:

Select * from
(select name, bday, address, dbms_random.value(1, 100) as joker 
from employee)
where joker>5 
order by joker asc
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top