thanks
DECODE works like a charm,

but the outer join query takes too long.

Atleast it works, thanks again. I will also try UNion query to see if it is any faster.

Sonali