I have one view with 3 fields like the view name is myview and it has following sql statement.
I created a function like below:-
Now i want to pass row and name of field and let it return the value from function on basis of field name i pass to the function like
this suppose to return value of fn from myfun because i'm passing fn as a parameter name.
hope it is clear, if yes, how i can achieve this?
Code:
select fn,ln,city from tablea
Code:
create function myfun(in t myview, in f varchar(50)) returns varchar(100) as
Code:
select myfun(*, 'fn') from myview
hope it is clear, if yes, how i can achieve this?
Comment