Hi there,
I need some help with the following query. Is there any other way to get the same result?
This is taking much time (select... order by is getting 1Million rows...)
I just want to get a random value (any value from table with those conditions).
SELECT REF FROM
(SELECT REF
FROM REF_MULT
WHERE ENT=199 AND DT IS NULL
ORDER BY DBMS_RANDOM.VALUE)
WHERE ROWNUM=1
Thanks in advance for any answer.
Best Regards,
Helena