Thanks again!
one final small question. In the first example you have
,substr(nvl(to_char(max(decode(nday,1,arts,null))),'-'),1,4) Day1
while in the last example you have
,substr(nvl(to_char(max(decode(nday,1,arts,null))),'-'),1,6) Day1
Why 4 on the first and 6 on the second?
</Morten>