【发布时间】:2013-05-20 21:21:17
【问题描述】:
我正在编写一份 jasper 报告,该报告采用一个参数,根据该参数应该有一个不同的 where 子句。以下是我正在使用的查询,但似乎某处存在语法错误。
select customer.name
customer_order.name
from customer, customer
where customer.orders > 0
and customer_order.customer_id = customer.id
and customer_order.name in
(
case when (<paramter> = 1) then ('order1', 'order2')
else (select order_name from customer_order)
end
);
感谢您的帮助, 谢谢
【问题讨论】:
标签: sql oracle jasper-reports case