Domanda

Ho dei problemi con la mia domanda ...

Questo funziona:

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

Ma quando cerco di ottenere ciò che voglio utilizzando il 'dove' e il gruppo / clausola having, sto ottenendo un errore ORA-00904 (identificatore valido) ..

per es.

  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 

Che cosa potrebbe essere il mio problema qui e come posso query utilizzando la colonna jolly?

È stato utile?

Soluzione

provare:

Select * from
(select name, bday, address, dbms_random.value(1, 100) as joker 
from employee)
where joker>5 
order by joker asc
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top