Custom Query Different Results

I have a Server Action that has a Custom Query and when I test the query with a “Test Value” it only returns one result. But if I type the value directly into the SQL statement and run, it returns the correct three results. What would cause this to happen?

SQL Statement -
SELECT app_settings.app_name, app_settings.app_link
FROM app_settings
WHERE app_settings.menu_id = :P1
AND app_settings.app_id IN (:P2)
AND app_settings.app_status = 1

:P1 = 1
:P2 = 1,2,3,4,5,6,7,8

SQL Statement without P2
SELECT app_settings.app_name, app_settings.app_link
FROM app_settings
WHERE app_settings.menu_id = :P1
AND app_settings.app_id IN (1,2,3,4,5,6,7,8)
AND app_settings.app_status = 1

Community Page
Last updated: