Link to home
Start Free TrialLog in
Avatar of jung1975
jung1975

asked on

dynamic column name in view

How can I dynamically change the column name based on the data in the column?

I have a dynamic table(called table A) and  column(column1) in the source table and the data can be dynamically populated ..
For example,

TableA

Column1

Country

Country

----etc…

 And I am trying to create a view that populate column 1 from table A but i need to change the column name based on the value in column1
so the view should return country as columnname

how can i do this inside view?
ASKER CERTIFIED SOLUTION
Avatar of Ryan Chong
Ryan Chong
Flag of Singapore image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jung1975
jung1975

ASKER

yes.. Then the column name and the column value should be  the same.. can I do thsi in view?
the dynamic coulmn will allways have one value.... and the column name should be the same as the value .. hope this make sense?

 
Id           column1
1001      country
1002      country
1908      contry

so the view should return in this case..
Id           COUNTRY
1001      country
1002      country
1908      contry


it can be
Id          region
1001      region
1002      region
1908      region

SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial