Hi,
Still not working,
for example

if dname is null then I need to add 5 As.

select decode(dname,null,rpad(dname,5,'A') from dept;

Thanks.