Forum OpenACS Q&A: oracle support for case when...

Collapse
Posted by Dan Wickstrom on
Does anybody recall the version when oracle started supporting case when statements?  Was it 8.1.7?
Collapse
Posted by Jonathan Ellis on
I think it was actually 8.1.6...
Collapse
Posted by Don Baccus on
I couldn't get it to work in 8.1.6 but a quick search on Google clued me in to why that might be true:

"CASE was introdiced in Oracle 8i, but only in SQL, not in PL/SQL.
It is available both in SQL and PL/SQL in Oracle 9i."

I was probably trying it in a PL/SQL statement ...

I have 8.1.6 here I'll try to remember to test it in SQL, would be nice to get rid of some of the Oracle-specific queries in the toolket!

Collapse
Posted by Brian Fenton on
Tom Kyte talks about this on his site and shows a workaround using dynamic SQL. Here's one example: http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:4333097088785