I have a condition like if (someparam! = Value1) someparam = 1 if (someparam! = Value2) someparam = 2 Default = 1
How to use the decoding function for this condition
DECODE(SomeParam, Value1, DECODE(SomeParam, Value2, 1, 2), 1)
but better:
case when someparam != Value1 then 1 whene someparam != Value2 then 2 else 1 end
decode(someparam, value2, 1, 2)
All comparison with value1 seems redundant, since it will still be used by default.
DECODE (SomeParam, someParam!= value1, 1, someParam!= value2, 2, 1)
, someparam!= Value1 :
DECODE (SomeParam, someParam!= value2, 2, 1)
, : -)
Source: https://habr.com/ru/post/1760685/More articles:How to get an average processor / processor using a computer? - windowshttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1760681/why-cant-the-datacontext-detect-changes-to-controls-binded-to-a-dataview-when-these-changes-are-done-via-js&usg=ALkJrhh-8LOSwabb5k0ofy1Cj58LV5QzKwWord Count XSLT 1.0 with HTML - htmlRuby Custom Logging Rules - ruby | fooobar.comИзвлечение данных из вложенных таблиц в PDF - c#JQuery animation when another animation runs - jqueryShell variable misinterpreted in awk - awkchar, указатель, литые и строковые вопросы - c++Capturing an image as an array using Python OpenCV - pythonFile I / O in the programming language D - dAll Articles