COGNOiSe.com - The IBM Cognos Community

IBM Cognos Analytics Platform => Cognos Analytics => Reporting => Topic started by: Hatcher12 on 03 Apr 2023 03:14:49 PM

Title: Prompt values into LIKE operator.
Post by: Hatcher12 on 03 Apr 2023 03:14:49 PM
Hello,

I have a query and one of the columns (ovr_new_value) I am pulling has a long string something like this

   "WRKP_MINUTES=766","WRKP_DEPT_NAME=1276","WRKP_JOB_NAME=37603","WRKP_PREM_TCODE_NAME=BSA25","WRKP_DOCK_NAME=43101","WRKP_REMOVE_SAME_TIMECODE=Y"

My WHERE clause currently includes, "o.ovr_new_value LIKE CONCAT( CONCAT( '%', #sq(promptmany('t_code', 'string'))# ), '%' )".
I realized now that when multiple tcode_name are inserted I return no results. I assume it will just add the parameters at once into this LIKE operator as list of strings (Ex. BSA5, BSA10, BSA15) which is no good. Is there a way I can leverage the LIKE operator while using multiple parameters? If the parameters are BSA5, BSA10, BSA15 it should return every row WHERE ovr_new_value LIKE BSA5 or BSA10 or BSA15.

Thank you.