mercredi 27 novembre 2019

Oracle CASE WHEN multi rows

I am just wondering if I can rewrite my query using CASE WHEN THEN ELSE. When all codes are NULL then return 'no values' but if not then use subquery with UNPIVOT function. Is this possible? All the time I got an error, that my query return multi rows instead of single one. I can add I am working with Oracle on daily basis.

Please see the SQL Filddle below:

http://sqlfiddle.com/#!4/a88e6/13

Thanks for help!

Aucun commentaire:

Enregistrer un commentaire