テーブル情報
システム名 http://www.as-link.com/  作成者 秦 松甫 
サブシステム名 ERPlus@iDempiere3.1_daily  作成日 2016/3/7 
スキーマ名 adempiere  更新日  
論理テーブル名   RDBMS  PostgreSQL 9.4.5 on x86_64-unknown-linux-gnu, compiled by gcc (GCC) 4.8.3 20140911 (Red Hat 4.8.3-9), 64-bit 9.4.5 
物理テーブル名 rv_fact_acct_day     
備考


カラム情報
No 論理名 物理名 データ型 Not Null デフォルト 備考
1 ad_client_id numeric(10)  
2 ad_org_id numeric(10)  
3 c_acctschema_id numeric(10)  
4 account_id numeric(10)  
5 dateacct date  
6 c_period_id numeric(10)  
7 gl_category_id numeric(10)  
8 gl_budget_id numeric(10)  
9 c_tax_id numeric(10)  
10 m_locator_id numeric(10)  
11 postingtype character(1)  
12 c_currency_id numeric(10)  
13 amtsourcedr numeric  
14 amtsourcecr numeric  
15 amtsource numeric  
16 amtacctdr numeric  
17 amtacctcr numeric  
18 amtacct numeric  
19 rate numeric  
20 m_product_id numeric(10)  
21 c_bpartner_id numeric(10)  
22 ad_orgtrx_id numeric(10)  
23 c_locfrom_id numeric(10)  
24 c_locto_id numeric(10)  
25 c_salesregion_id numeric(10)  
26 c_project_id numeric(10)  
27 c_campaign_id numeric(10)  
28 c_activity_id numeric(10)  
29 user1_id numeric(10)  
30 user2_id numeric(10)  
31 a_asset_id numeric(10)  


ソース
ソース
 SELECT fact_acct.ad_client_id,
fact_acct.ad_org_id,
fact_acct.c_acctschema_id,
fact_acct.account_id,
firstof((fact_acct.dateacct)::timestamp with time zone, 'DD'::character varying) AS dateacct,
fact_acct.c_period_id,
fact_acct.gl_category_id,
fact_acct.gl_budget_id,
fact_acct.c_tax_id,
fact_acct.m_locator_id,
fact_acct.postingtype,
fact_acct.c_currency_id,
sum(fact_acct.amtsourcedr) AS amtsourcedr,
sum(fact_acct.amtsourcecr) AS amtsourcecr,
sum((fact_acct.amtsourcedr - fact_acct.amtsourcecr)) AS amtsource,
sum(fact_acct.amtacctdr) AS amtacctdr,
sum(fact_acct.amtacctcr) AS amtacctcr,
sum((fact_acct.amtacctdr - fact_acct.amtacctcr)) AS amtacct,
CASE
WHEN (sum((fact_acct.amtsourcedr - fact_acct.amtsourcecr)) = (0)::numeric) THEN (0)::numeric
ELSE (sum((fact_acct.amtacctdr - fact_acct.amtacctcr)) / sum((fact_acct.amtsourcedr - fact_acct.amtsourcecr)))
END AS rate,
fact_acct.m_product_id,
fact_acct.c_bpartner_id,
fact_acct.ad_orgtrx_id,
fact_acct.c_locfrom_id,
fact_acct.c_locto_id,
fact_acct.c_salesregion_id,
fact_acct.c_project_id,
fact_acct.c_campaign_id,
fact_acct.c_activity_id,
fact_acct.user1_id,
fact_acct.user2_id,
fact_acct.a_asset_id
FROM fact_acct
GROUP BY fact_acct.ad_client_id, fact_acct.ad_org_id, fact_acct.c_acctschema_id, fact_acct.account_id, firstof((fact_acct.dateacct)::timestamp with time zone, 'DD'::character varying), fact_acct.c_period_id, fact_acct.gl_category_id, fact_acct.gl_budget_id, fact_acct.c_tax_id, fact_acct.m_locator_id, fact_acct.postingtype, fact_acct.c_currency_id, fact_acct.m_product_id, fact_acct.c_bpartner_id, fact_acct.ad_orgtrx_id, fact_acct.c_locfrom_id, fact_acct.c_locto_id, fact_acct.c_salesregion_id, fact_acct.c_project_id, fact_acct.c_campaign_id, fact_acct.c_activity_id, fact_acct.user1_id, fact_acct.user2_id, fact_acct.a_asset_id;


インデックス情報
No インデックス名 カラムリスト ユニーク 備考


外部キー情報
No 外部キー名 カラムリスト 参照先 参照先カラムリスト


外部キー情報(PK側)
No 外部キー名 カラムリスト 参照元 参照元カラムリスト


RDBMS固有の情報
No プロパティ名 プロパティ値
1 schemaname adempiere
2 viewname rv_fact_acct_day
3 viewowner adempiere
4 definition SELECT fact_acct.ad_client_id,
fact_acct.ad_org_id,
fact_acct.c_acctschema_id,
fact_acct.account_id,
firstof((fact_acct.dateacct)::timestamp with time zone, 'DD'::character varying) AS dateacct,
fact_acct.c_period_id,
fact_acct.gl_category_id,
fact_acct.gl_budget_id,
fact_acct.c_tax_id,
fact_acct.m_locator_id,
fact_acct.postingtype,
fact_acct.c_currency_id,
sum(fact_acct.amtsourcedr) AS amtsourcedr,
sum(fact_acct.amtsourcecr) AS amtsourcecr,
sum((fact_acct.amtsourcedr - fact_acct.amtsourcecr)) AS amtsource,
sum(fact_acct.amtacctdr) AS amtacctdr,
sum(fact_acct.amtacctcr) AS amtacctcr,
sum((fact_acct.amtacctdr - fact_acct.amtacctcr)) AS amtacct,
CASE
WHEN (sum((fact_acct.amtsourcedr - fact_acct.amtsourcecr)) = (0)::numeric) THEN (0)::numeric
ELSE (sum((fact_acct.amtacctdr - fact_acct.amtacctcr)) / sum((fact_acct.amtsourcedr - fact_acct.amtsourcecr)))
END AS rate,
fact_acct.m_product_id,
fact_acct.c_bpartner_id,
fact_acct.ad_orgtrx_id,
fact_acct.c_locfrom_id,
fact_acct.c_locto_id,
fact_acct.c_salesregion_id,
fact_acct.c_project_id,
fact_acct.c_campaign_id,
fact_acct.c_activity_id,
fact_acct.user1_id,
fact_acct.user2_id,
fact_acct.a_asset_id
FROM fact_acct
GROUP BY fact_acct.ad_client_id, fact_acct.ad_org_id, fact_acct.c_acctschema_id, fact_acct.account_id, firstof((fact_acct.dateacct)::timestamp with time zone, 'DD'::character varying), fact_acct.c_period_id, fact_acct.gl_category_id, fact_acct.gl_budget_id, fact_acct.c_tax_id, fact_acct.m_locator_id, fact_acct.postingtype, fact_acct.c_currency_id, fact_acct.m_product_id, fact_acct.c_bpartner_id, fact_acct.ad_orgtrx_id, fact_acct.c_locfrom_id, fact_acct.c_locto_id, fact_acct.c_salesregion_id, fact_acct.c_project_id, fact_acct.c_campaign_id, fact_acct.c_activity_id, fact_acct.user1_id, fact_acct.user2_id, fact_acct.a_asset_id;