Pergunta

Estou tendo problemas com minha consulta ...

Este funciona:

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

Mas quando tento obter o que quero usando a cláusula 'where' e em grupo/tendo, estou recebendo um erro ORA-00904 (Identificador Inválido).

por exemplo

  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 

Qual poderia ser o meu problema aqui e como posso consultar usando a coluna do Joker?

Foi útil?

Solução

tentar:

Select * from
(select name, bday, address, dbms_random.value(1, 100) as joker 
from employee)
where joker>5 
order by joker asc
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top