|
发表于 2014-3-18 15:55:09
|
显示全部楼层
Hi rmackenzie
Thanks for the snippet, I am almost there. But as soon as I drill down I get the following message.
"Drill object was successfully built but did not return a valid handle. Check the Message Log."
Looking at the message log, I get no detail.
Searching in the log files I get my a file "TM1ProcessError_20110824110259_}Drill_GLProteaReportTOTransactions.log"
Code: Error executing SQL query:
"SELECT
TOP (100) dim_entity.domain_code,
dim_entity.entity_code,
dim_entity.entity_name,
dim_base_currency.base_currency_code,
dim_account.account_code,
dim_account.account_description,
dim_sub_account.sub_account_code,
dim_sub_account.sub_account_description,
dim_cost_center.cost_center_code,
dim_cost_center.cost_center_description,
dim_layer.layer_code, dim_layer.layer_description,
dim_effective_date.effective_fin_year,
dim_effective_date.effective_cal_month_name,
dim_effective_date.effective_fin_month_no,
'ACTUAL' AS Version, fact_gl_transaction.transaction_reference,
fact_gl_transaction.reversal_flag,
fact_gl_transaction.line_number,
fact_gl_transaction.posting_voucher_reference,
fact_gl_transaction.batch, fact_gl_transaction.daybook_code,
fact_gl_transaction.daybook_entry_num,
fact_gl_transaction.description,
fact_gl_transaction.[document],
fact_gl_transaction.document_type,
fact_gl_transaction.source_gl_description,
fact_gl_transaction.user_id,
fact_gl_transaction.correction_flag,
fact_gl_transaction.amount_base
FROM fact_gl_transaction
INNER JOIN dim_account ON fact_gl_transaction.dim_account_key = dim_account.dim_account_key
INNER JOIN dim_cost_center ON fact_gl_transaction.dim_cost_center_key = dim_cost_center.dim_cost_center_key
INNER JOIN dim_entity ON fact_gl_transaction.dim_entity_key = dim_entity.dim_entity_key
INNER JOIN dim_layer ON fact_gl_transaction.dim_layer_key = dim_layer.dim_layer_key
INNER JOIN dim_sub_account ON fact_gl_transaction.dim_sub_account_key = dim_sub_account.dim_sub_account_key
INNER JOIN dim_base_currency ON fact_gl_transaction.dim_base_currency_key = dim_base_currency.dim_base_currency_key
INNER JOIN dim_effective_date ON fact_gl_transaction.dim_effective_date_key = dim_effective_date.dim_effective_date_key
WHERE (dim_entity.domain_code = 'PCHEMZA')
AND (dim_entity.entity_code in (' 'PCINL','PCWC','PCKZN','PCBR','PCEC'') )
AND (dim_base_currency.base_currency_code = 'ZAR')
AND (dim_account.account_code in ('621610'))
AND (dim_effective_date.effective_fin_year = '2012')
AND (dim_effective_date.effective_cal_month_name = 'Apr')"
The debug.txt file contains:
Code: " 'PCINL','PCWC','PCKZN','PCBR','PCEC'"
The double quotes are like that in the file. Is it just the way the file is outputted or is it the actual value stored in sSQL?
Anyhow, I guess I should fix the syntax in the where statement from
Code: AND (dim_entity.entity_code in ('?vDivision?') )
to
Code: AND (dim_entity.entity_code in (?vDivision?) )
Yes, that worked!!!!
Just a reminder, the SQL parser complains that the SQL fails as soon as I save it, but when I drill, it works like a bomb.
rmackenzie, I thank you very much. |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
|