I need to generate a multiple row with different random values (each value different from different row) using a single select statement , I've used this:
select (with strings as (select 'A' as s from dual union all select 'B' as s from dual) select (select s from (select s from strings order by dbms_random.value) s where rownum=1) as x from dual) random from dual connect by level <=3;
But I get in the result always the same value :
RANDOM
B B B
I need to have something like:
RANDOM
A B A
Could you help please?
Regards
Aucun commentaire:
Enregistrer un commentaire