Thank you, Padders, that made it much clearer for me.

I don't want to get on your nerves, but I'm still stuck on that other thread I posted about the student-qualification problem. Would you mind having a look at it and giving me your opinion?

This is still bugging me terribly and I want to start writing a procedure instead with IF statements and so on, but the DECODE possibilities seem so elegant.

I'd be very thankful for your help.