Pentahoケトルは初めてです。
テーブル入力ステップの結果セットを使用して、MicrosoftExcelの出力を生成する必要があります。
変換で次の手順を使用しています
- システムデータの取得-取得するテーブルデータの日付範囲を提供します
- テーブル入力-前のステップで指定された日付範囲に基づいてテーブルデータを取得するSQL
- Excelの出力-ステップ2の結果セットを使用してExcelを生成します。
私のExcel出力では、列ヘッダーの前に3つの空の行が必要です。そのため、unionを使用して空の行を生成し、SQLを使用して列ヘッダーを作成しようとしました。しかし、SQLで空の行を選択すると、ケトルはフィールドにフォーマットを適用しません(すべてのフィールド値は文字列と見なされます)。
結果セットを乱すことなく、列ヘッダーの前にExcel出力で空の行を生成する方法はありますか?
SELECT
'' AS 'Accounting Month', '' AS 'Insured Name','' AS 'Policy Number','' AS 'Company Name','' AS 'Line Of Business','' AS 'Transaction Type', '' AS 'Effective Date','' AS 'Rate','' AS 'Gross Premium','' AS 'Commission Amount', '' AS 'Expense Constant', '' AS 'Net Amount','' AS 'Payment Amount', 1 as ORDERS
UNION ALL
SELECT
'' AS 'Accounting Month', '' AS 'Insured Name','' AS 'Policy Number','' AS 'Company Name','' AS 'Line Of Business','' AS 'Transaction Type', '' AS 'Effective Date','' AS 'Rate','' AS 'Gross Premium','' AS 'Commission Amount', '' AS 'Expense Constant', '' AS 'Net Amount','' AS 'Payment Amount', 1 as ORDERS
UNION ALL
SELECT
'' AS 'Accounting Month', '' AS 'Insured Name','' AS 'Policy Number','' AS 'Company Name','' AS 'Line Of Business','' AS 'Transaction Type', '' AS 'Effective Date','' AS 'Rate','' AS 'Gross Premium','' AS 'Commission Amount', '' AS 'Expense Constant', '' AS 'Net Amount','' AS 'Payment Amount', 1 as ORDERS
UNION ALL
SELECT
'' AS 'Accounting Month', '' AS 'Insured Name','' AS 'Policy Number','' AS 'Company Name','' AS 'Line Of Business','' AS 'Transaction Type', '' AS 'Effective Date','' AS 'Rate','' AS 'Gross Premium','' AS 'Commission Amount', '' AS 'Expense Constant', '' AS 'Net Amount','' AS 'Payment Amount', 3 as ORDERS
UNION ALL
SELECT
'Accounting Month',
'Insured Name',
'Policy Number',
'Company Name',
'Line Of Business',
'Transaction Type',
'Effective Date',
'Rate',
'Gross Premium',
'Commission Amount',
'Expense Constant',
'Net Amount',
'Payment Amount',
2 ORDERS
UNION ALL
SELECT * FROM (
SELECT
CONCAT(ACCOUNT_YEAR,ACCOUNT_MONTH) AS 'Accounting Month',
INSURED_NAME AS 'Insured Name',
POLICY_NUMBER AS 'Policy Number',
COMPANY AS 'Company Name',
LINE_OF_BUSINESS AS 'Line Of Business',
TRANSACTION_DETAIL_TYPE 'Transaction Type',
DATE_FORMAT(CHANGE_EFFECTIVE_DATE,'%m/%d/%Y') AS 'Effective Date',
OWNER_COMMISSION_RATE AS 'Rate',
GROSS_PREMIUM AS 'Gross Premium',
OWNER_COMMISSION_AMOUNT AS 'Commission Amount',
EXPENSE_CONSTANT AS 'Expense Constant',
NET_AMOUNT AS 'Net Amount',
NET_AMOUNT AS 'Payment Amount' ,
4 ORDERS
FROM TABLE1
WHERE
DATE(TRANSACTION_ENTRY_DATE) >=?
AND
DATE(TRANSACTION_ENTRY_DATE) <=?
ORDER BY TABLE1.POLICY_NUMBER,TABLE1.FLAG,TABLE1.ENDORSEMENT_NUMBER
)T
ORDER BY ORDERS;