Multiple values in variable and need to check IF condition for each value

I'm writing DB2 stored procedure. This stored procedure will be called using .ksh script.
I was stuck in checking IF condition. I have a variable "CHECK" which will have number of values as below...
CHECK = 'test1,test3,test8,......testn' ---- variable datatype is varchar

here test1 is one value, test3 is one value, etc. need to check each value in IF condition as below

   IF CHECK= 'test1'
    THEN
   --PRINT TEST1 HERE;
    END IF;
    IF CHECK = 'test8'
    THEN
    --PRINT TEST8 HERE;
    END IF;

could you please help me to achieve this?

Hello @Kayal, Sorry but this is not clear, could you please do add more details in your question along with your efforts which you have put in order to solve your own problem.

Kindly do edit your post and let us know then.

Thanks,
R. Singh

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.