Skip to main content
17-Peridot
November 8, 2021
Solved

SQL Query with WHERE and IN clause

  • November 8, 2021
  • 2 replies
  • 6530 views

How to implement SQL query in thingworx as follows,

Query:

SELECT * FROM Customers
WHERE Country NOT IN ('Germany''France''UK');

 

In thingworx, how to pass country names as input parameter.

 

 

Best answer by slangley

Hi @Sathishkumar_C.

 

Take a look at this post to see if it helps.

 

Regards.

 

--Sharon

 

2 replies

24-Ruby III
November 8, 2021
17-Peridot
November 9, 2021

No. Im going to use this query in "Database Thing" as "SQL Query". So, I want pass comma separated values to this query. How can i do with Thinworx SQL query services?

1-Visitor
November 9, 2021

you can try like this:

select * from user_model where name not in ([[name1]],[[name2]])
Where name1 and name2 are your service inputs.

slangleyCommunity ManagerAnswer
Community Manager
December 17, 2021

Hi @Sathishkumar_C.

 

Take a look at this post to see if it helps.

 

Regards.

 

--Sharon

 

17-Peridot
December 20, 2021

Thanks for you support. Let me test in my environment and confirm.