How to paste extracted phone number in sql query with dynamic variable to execute?

For eg,phonenumber1=+14123456789
phone number2=+14987654321,+14333555777

In sql query,it should be passed like this if one phone number exist
‘+14123456789’
It should be passed like this if double phone numbers are there
‘+14987654321’,‘+14333555777’
Please help anyone

Hi,

How about the following expression?

"'"+String.Join("','",yourString.Split(","c))+"'"

Regards,

If I use this expression, getting output like this
‘{+14567098765’,‘+14890987890’

Hi,

Can you check your input string? In my environment, it works as the following.

Regards,

Thanks.It worked

1 Like

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