View: dbo.Consolidation_Subsidiary_Client_Transaction_View | |||
View definition | |||
-- drop view Consolidation_Subsidiary_Client_Transaction_View create view dbo.Consolidation_Subsidiary_Client_Transaction_View as select je.client_KEY , glt.gl_transaction_KEY , je.journal_entry_KEY , jed.journal_entry_distribution_KEY , jed.is_subsidiary_client_summary , subsidiary__sequence_number = case when patindex(N'%[^0-9]%', gla.segment1) = 0 then cast(gla.segment1 as int) else 0 end , glp.gl_period_number , gl_fiscal_year_end_date = glfy.end_date from dbo.Client_Consolidation_Option as cco inner join dbo.Journal_Entry as je on cco.client_KEY = je.client_KEY inner join dbo.GL_Transaction_N_Journal_Entry as gltnje on je.journal_entry_KEY = gltnje.journal_entry_KEY inner join dbo.GL_Transaction as glt on gltnje.gl_transaction_KEY = glt.gl_transaction_KEY inner join dbo.GL_Period as glp on glp.gl_period_KEY = glt.gl_period_KEY inner join dbo.GL_Fiscal_Year as glfy on glfy.gl_fiscal_year_KEY = glp.gl_fiscal_year_KEY inner join dbo.Journal_Entry_Distribution as jed on je.journal_entry_KEY = jed.journal_entry_KEY inner join dbo.GL_Account as gla on gla.gl_account_KEY = jed.gl_account_KEY where gla.segment1 <> N'' | |||