Question


Tekclan Software Solutions
IN
Last activity: 5 Aug 2025 11:01 EDT
Passing List of values to connect sql
Hi, We have connect sql rule in that we are trying to send list of status through in Statement. But it is not returning the expected results.
select * from tablename where status in ({.Status})
Sample approachs tried:
.status = 'Application Approved','Application Denied'
.status = Application Approved,Application Denied
.status = "Application Approved,Application Denied"
-
Reply
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!


Pegasystems Inc.
CA


Booz Allen Hamilton
US
Hi, I have a similar issue where the delete failed to retrieve the results.
I wrote: DELETE FROM {CLASS: {.pySearchText}} WHERE ID IN ({.pyTempText});
and trying to pass .pyTempText = "'A-3001','A-3004'" my database has these records and the step looks correct to me, but no result returned. Any suggestions? Thanks!


Tekclan Software Solutions
IN
This is same query i tried. Can you share any difference in query
Updated: 31 Jul 2025 10:52 EDT


Booz Allen Hamilton
US
I think Ramesh meant to capitalize some of the word: SELECT FROM ... WHERE ... IN
UPDATE: Hey, I think I figured it out. I added ASIS: and it resolved my issue
try SELECT * FROM tablename WHERE status IN ({ASIS:.Status})
Hope this helps!


Booz Allen Hamilton
US
@DhanasekarC0202 did you try this {ASIS:.Status}?


HCA Healthcare
US
In Pega’s Connect SQL rule, if you want to pass a list of statuses using the IN clause, you can’t just pass a comma-separated string directly it won’t work as expected. Instead, you need to format the list properly by adding single quotes around each value, like this: 'Application Approved','Application Denied'. You can build this formatted string in a Data Transform or Activity and pass it as a parameter (for example, .StatusList). Then, in your SQL rule, write: SELECT * FROM tablename WHERE status IN ({.StatusList}). Make sure you don’t add extra quotes in the SQL, and avoid trailing commas or unnecessary spaces in the string. This way, the SQL will interpret the list correctly and return the expected results


Tekclan Software Solutions
IN
@Sairohith This also one of the methods we tried sending list of status. But it didn't worked.