Skip to main content
3-Newcomer
Mar 31, 2025 5:46 PM UTC
Solved

Use Input parameter to generate sql queries

Hello

 

I am trying to figure out How to use input parameters for SQL in ThingWorx

 

Any help will be appreciated

 

Thanks

5-Regular Member
Apr 1, 2025 7:08 PM UTC

Hello @SS_13175359 

 

You can try and Use service input parameters to specify column value into WHERE clause of SQL Query or SQL Command by wrapping parameter name with double square brackets like [[xxx]]

for eg : SELECT * FROM user_data WHERE username = [[xxx]];

 

Let me know if it still doesn't work

Thanks

2 replies

16-Pearl
Apr 1, 2025 2:14 PM UTC

Hi @SS_13175359. Look at the article below for your reference.

https://www.ptc.com/en/support/article/CS413368

Translate
5-Regular Member
Apr 1, 2025 7:08 PM UTC

Hello @SS_13175359 

 

You can try and Use service input parameters to specify column value into WHERE clause of SQL Query or SQL Command by wrapping parameter name with double square brackets like [[xxx]]

for eg : SELECT * FROM user_data WHERE username = [[xxx]];

 

Let me know if it still doesn't work

Thanks

Translate