日期:2014-05-17 浏览次数:20489 次
select c.* from (
select legal_entity_id,process_date,record_id,amount from engine_fp where process_date='2013-06-25'
) s pivot (max(amount) for record_id in([23],[24],[25],[26],[27],[28],[29],[30],[31],[33],[34],[38]))
c order by legal_entity_id
WITH query AS (
SELECT inner_query.*, ROW_NUMBER() OVER (ORDER BY CURRENT_TIMESTAMP) as __hibernate_row_nr__
FROM (
select TOP(40) c.* as page0_ from (
select legal_entity_id,process_date,record_id,amount from engine_fp where process_date='2013-06-25'
) s pivot (max(amount) for record_id in([23],[24],[25],[26],[27],[28],[29],[30],[31],[33],[34],[38]))
c order by legal_entity_id
) inner_query
) SELECT page0_ FROM query WHERE __hibernate_row_nr__ >= 20 AND __hibernate_row_nr__ < 40
WITH query AS (
SELECT inner_query.*, ROW_NUMBER() OVER (ORDER BY CURRENT_TIMESTAMP) as __hibernate_row_nr__
FROM (
select TOP(40) * from (
select legal_entity_id,process_date,record_id,amount from engine_fp where process_date='2013-06-25'
) s pivot (max(amount) for record_id in([23],[24],[25],[26],[27],[28],[29],[30],[31],[33],[34],[38]))
c order by legal_entity_id
) inner_query
) SELECT legal_entity_id,process_date,record_id,amount
FROM query WHERE __hibernate_row_nr__ >= 20 AND __hibernate_row_nr__ < 40