With the following SQL queries, you can check the values in Lucanet.Financial Warehouse. Run the queries with the Analyze database function (see Analyzing Databases).

The SQL queries for Lucanet.Financial Warehouse help in the following situations:

  • Incorrect values are displayed in Lucanet, but the correct values are contained in Lucanet.Financial Warehouse. In this case, the import into the reporting entities must be checked.
  • The expected values are not in Lucanet.Financial Warehouse. In this case, a check must be performed to determine whether the import into Lucanet.Financial Warehouse and the script used for the import were configured correctly.

The following notes apply when you use the SQL queries for Lucanet.Financial Warehouse:

  • The elements listed under Placeholders in the Queries are placeholders and must be replaced accordingly.
  • Individual lines can be commented out using //, which means the lines are no longer taken into account in the SQL query.
  • Texts, and therefore also dimension values, are put in single quotation marks ('). Figures, such as the fiscal year and periods, are not.
  • You can combine various queries with UNION or UNION ALL if the number of result columns, their names, and their data types are identical. With UNION, data records that occur multiple times are not returned, which only affects duplicates. With UNION ALL, all data records are returned.
  • For the SQL statements, the following aliases can be used for the tables, if necessary, to make the queries clearer: B for Bundle, OB for OpeningBalance, FP for FinancialPosting, and FPL for FinancialPostingLine.

The following operators can be used in the SQL queries for Lucanet.Financial Warehouse:

OperatorDescription
=Equal to
!=Not equal to
<>Not equal to
>Greater than
<Less than
>=Greater than or equal to
<=Less than or equal to
BETWEEN x AND yIs between value x and y, each included
LIKE %%Placeholder for character strings
IN ()Matches any value in the specified list

Examples of the LIKE and IN operators:

  • "Dim_GLAccount" LIKE '%1000' means accounts that end with 1000.
  • "Dim_GLAccount" LIKE '1000%' means all accounts that start with 1000.
  • "Dim_GLAccount" IN ('1000', '2000', '3000') means the accounts 1000, 2000, and 3000.

Conditions can be linked with AND, OR, or NOT, for example NOT IN (x, y, z), and can be encapsulated using brackets.

The SQL queries for Lucanet.Financial Warehouse contain various placeholders that must be replaced before sending the SQL query:

PlaceholderDescription
ReportingEntityCodeName of the reporting entity
AdjustmentLevelCodeName of the adjustment level
DataLevelCodeName of the data level
FiscalYearFiscal year
PeriodPosting period
Account, and moreDimension value

The following default dimensions are available in Lucanet.Financial Warehouse, if configured:

Dimension codeDescription
GLAccountLedger account
GroupAccountGroup account
SubLedgerAccountSub-account of ledger account, for example debtor, creditor, or asset
CostCenterCost center
FunctionAreaFunctional area
LegalEntityPartnerPartner
TransactionTypeTransaction type for schedules
BusinessUnitBusiness unit
CostElementCosts and/or revenue type from cost accounting
CostUnitCost unit
OrderOrder
OrganizationUnitOrganization unit
ProfitCenterProfit center
ProjectProject
StatisticAccountStatistical account

Dimension codes are specified for querying the master data from the ElementAttribute table without Dim_, for example GLAccount instead of Dim_GLAccount. For the ElementCode of subledger accounts (SubLedgerAccount), a prefix is usually used that specifies the account more specifically: C_ for creditors, D_ for debtors, and A_ for assets.

The following sections contain example queries for Lucanet.Financial Warehouse.

Determines the BundleCode for a specific reporting entity and fiscal year. The last executed import comes first.

sql
    
  

Determines all postings for a specific reporting entity, fiscal year, and period. It is possible to restrict the result to various dimensions.

sql
    
  

Determines the opening balance sheet values for a specific reporting entity and fiscal year. It is possible to restrict the result to various dimensions.

sql
    
  

Determines the balance for a specific reporting entity and fiscal year. It is possible to restrict the result to the period and to various dimensions.

sql
    
  

Determines the master data for a specific reporting entity, fiscal year, and element. It is possible to restrict the result to various dimensions.

sql
    
  

This content was generated using AI and reviewed by Lucanet subject matter experts before publication.