Is there a way to do something like this? (This is pseudo code)
CASE(@P1) WHEN 'a' or 'd' or 'z' THEN 1 WHEN 'b' or 't' THEN 2 ELSE 0
The idea is that I can check for multiple values that should return the same value. that is, 'a' returns 1 and 't' returns 2
select CASE WHEN @P1 in ('a', 'd', 'z') THEN 1 WHEN @P1 in ('b', 't') THEN 2 ELSE 0 END from your_table
or
select CASE WHEN @P1 = 'a' or @P1 = 'd' or @P1 = 'z' THEN 1 WHEN @P1 = 'b' or @P1 = 't' THEN 2 ELSE 0 END from your_table
Source: https://habr.com/ru/post/1540543/More articles:Skip list in java - javaTable items are not ordered properly after upgrading to Microsoft.WindowsAzure.Storage 4.0.0 - c #Borders of a Voronoi diagram: how to get edges in the form (point1, point2) from a scipy.spatial.Voronoi object? - pythonRemote Cordova / PhoneGap application download - javascriptError installing pycups on virtualenv - linuxProguard не может найти ссылочный метод 'void allowCoreThreadTimeOut (boolean)' - androidGrails 2.3.7 remove itext 2.0.8 jar - grailsCannot connect to OAuth 2.0 using PHP - phpWhen a form fails, the display URL changes in Rails 4 - ruby-on-railsGrails Spring Security manually starts onAuthenticationSuccessEvent - springAll Articles