You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »


Error rendering macro 'sql'

java.sql.SQLException: Invalid object name 'CTP_qld_import'.

select CASE WHEN class LIKE '%seat%' THEN '+ per adult passenger seat over 7' ELSE class END AS Class, ISNULL(CAST(AAI AS VARCHAR),'n/a') AS SUNCORP,
ISNULL(CAST(ALLIANZ AS VARCHAR),'n/a') AS ALLIANZ ,
ISNULL(CAST(QBE AS VARCHAR),'n/a') AS QBE ,
ISNULL(CAST(RACQ AS VARCHAR),'n/a') AS RACQ
FROM (
select *
from
(
select period, rank, class, [insurer] , [gross_comm] AS premium
from [CTP_qld_import]
) src
pivot
(
SUM([premium])
for [insurer] in ([AAI], [ALLIANZ], [QBE], [RACQ])
) piv
) AS CTP
where period = 12 order by rank

  • No labels