I have 500 distinct values in one column. I would like to know how to split if possible in 2 columns .
Of course I can use case in select something like this
SELECT
case when rownum between 1 and 250 then i.item end a,
case when rownum between 251 and 500 then i.item end b
from items i;
but this divide the column in two but the number of rows persists. there will be in column A nulls in 251-500 and in column B 1-250 respectivly.
but I need 250 rows as result with first 250 values in columns A and next 250 values in column B
thanks
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…