Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9052

Can we pass a columns dynamically in the select statement of Calculation view.

$
0
0

I am looking for an approach where I need to pass the table columns dynamically.

I have a table with below structure.

 

Table name: TABLE_COLUMNS

USERID | COLUMNA | COLUMNB | COLUMNC|

---------------------------------------------------------------------

A          |    10           |    20           |        30

B          |    11           |     21          |        31

C          |    12           |     22          |        32

 

 

I have a CV created with an input parameter which accepts a 'column' from above table. Based on the input parameter recieved, I need to display the values of the column.

Eg: If the input parameter recieves 'COLUMNA' as input, then I need to display the values from COLUMNA.

 

Can any one help me with the query which I need to script in the Calculation view. Normally in SQL console, I can write as

SELECT DISTINCT COLUMNA FROM TABLE_COLUMNS.

 

But this doesn't work in the Calculation view. Can anyone post the query I can use or an approach I can use.


Viewing all articles
Browse latest Browse all 9052

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>