Support on “Not In” query syntaxis

Scenario,

  1. I’m writing a query on an assign activity with the following syntaxis: dtData.Select(“GRA =‘F25320001’ AND Balance > 0 AND Receiving =’ Confirmed ’ AND [Offsetting Entity] NOT IN (‘LD10469’,‘LD10577’,‘LD10588’)”).CopyToDataTable
    And the result is correct.

  2. My challenge begins when I created a variable vQuery as String with the dynamic values “‘LD10469’,‘LD10577’,‘LD10588’”

  3. The Not In Query is now wrote as the following: dtData.Select(“GRA =‘F25320001’ AND Balance > 0 AND Receiving =’ Confirmed ’ AND [Offsetting Entity] NOT IN ('”+vQuery+“')”).CopyToDataTable

The application is showing the error: Missing operand after ‘LD10469’ operator.

I have tried with different variations but I’m not able to replicate the correct syntaxis, any advice is welcome.

Cesar

1 Like

Hola @Cesar_Cotom

–Step 2-- I can see that you are creating the values = “‘LD10469’,‘LD10577’,LD10588

Look that you already have the

–Step 3 –
…NOT IN (”+vQuery+“)”).CopyToDataTable <===== You already have a it looks like this ‘“‘LD10469’**Tres comillas

That is why is saying that an operand is missing because the editor is expecting an operand when you close the apostrophe.


If this answer your question please mark as solved, don´t forget to like our answer.

Happy Automation :slight_smile:
Regards,

edit: typo

1 Like

Thanks for the advice,

Problem solved

Your Welcome.
De Nada

Happy Automation :slight_smile:
Eduardo Sacahui

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