I am trying to pass a parameter to order by in mysql jndi query, as follows, but it didn't work. Any help is appreciated.
select w.account_id,
c.name,
-w.payment_amount/100 as payment,
w.mrc_amount/100 as mrc,
w.amount_due/100 as due,
w.mou
from warehouse as w, dim_customer as c
where substring(w.date_key,1,6)=${yearmonth}
and w.account_id=c.account_id
order by ${measure} desc limit 10;
The yearmonth parameter is work fine, but measure for order by is not working. The measure will take {payment, mdc, due, mou} as I defined as values array for select component.
Thanks a lot.
select w.account_id,
c.name,
-w.payment_amount/100 as payment,
w.mrc_amount/100 as mrc,
w.amount_due/100 as due,
w.mou
from warehouse as w, dim_customer as c
where substring(w.date_key,1,6)=${yearmonth}
and w.account_id=c.account_id
order by ${measure} desc limit 10;
The yearmonth parameter is work fine, but measure for order by is not working. The measure will take {payment, mdc, due, mou} as I defined as values array for select component.
Thanks a lot.