checkerliner.blogg.se

Oracle plsql decode
Oracle plsql decode








You can also catch regular content via Connor's blog and Chris's blog.Or if video is more your thing, check out Connor's latest video and Chris's latest video from their Youtube channels. It is possible to use DECODE, but you'd have to use nested DECODEs and you'd end up with something that's much harder to read, understand and therefore maintain. In Oracle, you can use DECODE function to evaluate a list of expressions, and if a value is matched return the corresponding result. I have a scenario where i need to use a boolean function inside DECODE statement. 23 July 2020 Oracle/PLSQL DECODE functionhas functionality of IF-THEN-ELSE operator. Connor and Chris don't just spend all day on AskTOM. William Robertson at 22:53 1 Your example procedure call has mismatched brackets and ends with ,), otherwise I would convert it to the equivalent CASE expression. select 1 value1,Ĭase when 'a' = 'a' and 'b' = 'b' then 'pass' decode is one of those functions that only exists in SQL and not in PL/SQL.

oracle plsql decode

The simplest answer is don't use decode, use a case statement instead, e.g.










Oracle plsql decode