Hi
I have below code . I want if multiple recrods are retreived then email addtress should be stored in var address with comma separated.
var addresses = "[email protected]","[email protected]" ;
String _StrSQL = "SELECT T0.\"Email\" , T0.\"T0.CntctPrsn\" " +
"FROM \"ATULAYA_NEW_LIVE\".OCPR T0 " +
"INNER JOIN OVPM T1 ON T0.\"CardCode\" = T1.\"CardCode\" " +
"where T1.\"DocEntry\" = 62960";
Thanks
Sophia CarterPosted Mar 24, 2025, 6:05 AM
Absolutely! In the provided code snippet, the SQL query retrieves email addresses from a specific database based on certain conditions. If multiple records are retrieved, and you want to store those email addresses in a variable with comma separation, you can adjust your code to concatenate the email addresses accordingly.
Here's how you can modify your code to achieve this:
This modified code snippet will fetch email addresses from the database and store them in the `addresses` variable with comma separation. Additionally, it ensures that there is no trailing comma at the end of the `addresses` string.
Feel free to incorporate this logic into your existing codebase. If you have any more questions or need further clarification, please let me know!