我正在尝试制作简单的insert into FactTable (...)
select distinct
da.ID_Date as [ID_Date] ,
sc.Pk_Scenario as [ID_Scenario],
co.Pk_Consolidation as [ID_Consolidation],
br.PK_ShareBranch as [Id_Branch],
ka.PK_Cost as [ID_CostCategory],
cc.Pk_CostCenter as [ID_CostCenter],
isnull(case ka.AccountType
when 'c' then -1*cast(replace (amount,',','.') as decimal(18,2))
when 'r' then 1*cast(replace (amount,',','.') as decimal(18,2))
when 's' then cast(replace (amount,',','.') as decimal(18,2))
end, 0) as Amount,
isnull(case ka.AccountType
when 'c' then -1*cast(replace (amount,',','.') as decimal(18,2))
when 'r' then 1*cast(replace (amount,',','.') as decimal(18,2))
when 's' then cast(replace (amount,',','.') as decimal(18,2))
end, 0) as SharedAmount,
cy.Pk_Currency as ID_Currency
from
[dbo].[TempCdbSap] cdb
inner join
DimBranchShare br on br.[Branch No] = cdb.branch
inner join
DimDate da on da.MonthName = cdb.[Month] and da.Year = cdb.[year]
inner join
DimCostCenter cc on cc.CostCenterName = cdb.CostCenter
inner join
DimScenario sc on sc.ScenarioTypeDEU = cdb.Scenario
inner join
DimConsolidation co on co.ConsolidationType = cdb.Consolidation
inner join
DimCostCategory ka on ka.AccountNo = cdb.CostCategorySAP
inner join
DimCurrency cy on cy.CurrencyCode = cdb.Currency
where
da.ID_Date >= year(br.RowStartDate) * 100 + month(br.RowStartDate)
and da.ID_Date < year(br.RowEndDate) * 100 + month(br.RowEndDate)
挂钩或模块。为此,我使用ejabberd
。
创建Erlang项目,我将eclipse
提供给reference
源代码,我已从ejabberd
下载。
现在我写代码
github
现在我使用此命令编译
%% @author anuj
%% @doc @todo Add description to hello_word.
-module(hello_word).
-behavior(gen_mod).
-export([start/2,stop/1]).
start(_Host, _Opt) ->
?INFO_MSG("Loading module 'mod_hello' ", []).
stop(_Host) ->
ok.
这会向我显示此错误消息
(ErModule1_ejabberd@anuj)2> c(hello_word).
任何人都可以纠正这个过程如何为ejabberd创建一个简单的钩子并编译它。
答案 0 :(得分:1)
INFO_MSG是logger.hrl
中定义的宏。您需要将其包含在您的文件中:
-include("logger.hrl").