Hi all, I need to retrieve some data from SQL DB using SQL connector in Ms Flow or a Logic App.
I need to use a operator 'IN' which is a very common operator for SQL queries ans now also available in Dynamics CRM for lookup and option-sets.
I could have used execute SQL query step but since that operation is unsupported for 'On-Premise Data Gateway', so i am left with GET Rows option provided by SQL connector
which is very similar like the List Records option of CDS connector. Now i can't use the In operator here in filter query, i need to filter records based on a Alternate ID (Select * from Table where AlternateId in (1,2,3,4)). Has someone achieved a similar requirement any suggestions or refrences would be most welcome,
Hi Prem,
The ‘IN’ operator is a shorthand for multiple OR conditions.
So you can combine ‘eq’ and ‘or’ operators to replace ‘in’ operator.
Just like: AlternateId eq 1 or AlternateId eq 2 or AlternateId eq 3 or AlternateId eq 4
You can refer following link to see more about operators of filter query:
Regards,
Leah Ju
Please mark as verified if the answer is helpful. Welcome to join hot discussions in Dynamics 365 Forums.