Experts,
I am relatively new to hibernate and have gone through some basic tutorials and have been successful so far. But I am stumped when I had to convert an application to Hibernate. This uses a lot of crosstab queries and I have no clue where or how to begin. A sample query is pasted below.
Code:
select m_type, count(case when scheduled_ts >= DATE(NOW()) and
scheduled_ts < DATE(NOW() + INTERVAL 1 DAY )
and h_id= 'BS' then
scheduled_ts else NULL END ) as scheduled,
count(case when completed_ts != '0000-00-00 00:00:00'
and scheduled_ts >= DATE(NOW()) and
scheduled_ts < DATE(NOW() + INTERVAL 1 DAY )
and h_id= 'BS'
then completed_ts else NULL END) as completed
from order_status where m_type
in ('MR','CT') group by m_type
How do I go about this? Can anyone of you give me some pointers? I google'd but found nothing.
Any help would be appreciated.
Thanks
Samuel