cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X

How to pass column name as parameter in sql query.

sjatta
4-Participant

How to pass column name as parameter in sql query.

How to pass column name as parameter in sql query.                          

In my scenario I need to pass column name from mashup and want to display only that column data in grid.

PS : I have created a database thing which has a service that takes input as column name and fetch that column data .

When I pass parameter as shown in the image its returning the parameter name in place of data of the column.

Can anyone help how to pass column name from input parameter.




2 REPLIES 2
CRArko
17-Peridot
(To:sjatta)

Hello, Sudipta Jatta.

I found the article below which implies this is not a supported function of SQL Query.

https://www.ptc.com/en/support/article?n=CS237638

Unless I am misunderstanding your use case.

-- Craig A.

dupatel
19-Tanzanite
(To:sjatta)

sudipta jatta​: Please replace [] with << >> to make query as below :

select <<EmployeeName>> from advancedanamoly_sh2;

Please be careful with the usage in query since it might opens up security risk with SQL injections at run time.

-Durgesh

Top Tags