Answers for "case construct in where clause"

SQL
0

case construct in where clause

where 
case when slogic = 'begins' and partnum like sPartStrp||'%' 
     then 1
     when slogic = 'contains' and partnum like '%'||spartStrp||'%'
     then 1
     when slogic = 'equals' and partnum = sPartStrp
     then 1
     when partnum like sPartStrp || '%' 
     then 1
     else 0
 end = 1
and p.stock_type = 1
Posted by: Guest on March-09-2022

Code answers related to "SQL"

Browse Popular Code Answers by Language