I’m looking at some old PL/SQL code and I have dozen of DECODE functions written like this: DECODE(value_1, value_2, 1, 0) = 0 Now, I know these DECODEs make comparison between value_1 and value_2 and they return true or false based on the outcome of comparison. But, for the love of coding, could someone please tell me what’s the logic
Tag: decode
ORDER BY DECODE: Decode won’t reorder the days like I want it to
I’ve got an assignment where I need to return a certain report and then order it by the day, but I need Monday to be day #1 (by default, Sunday is day #1 in SQL). Here’s my code for the report and the …