Skip to main content

The requirement was like this:


       CASE 
         WHEN SUBSTR(PART_NO, 1, 2) IN('XX', 'YY', 'ZZ')  THEN
           SUBSTR(PART_NO, 1, 2)
         ELSE
           'SP'
       END CODE,

See also >>

multiple values in case statement | Toolbox Tech

@waidyah , what is the exact requirement , as per the case statement , if the first 2 letters are in (‘XX’,’YY’,’ZZ’)  then it will return the first two letters which are going to be same , if not it will bring ‘SP’ . It depends on your data. try to analyze the data and explain the requirment clearly.