Databoard SQL
COMMON TABLES
Whilst there are many hundreds of tables in the WorkBook database, the following tables below will help you to get started.
Note: this is the default verbiage, in some systems for example ‘Activities' are referred to as 'Cost Types'.
ACTIVITIES
Refer to the following article.
dbo.Act
General table with all Activites and the corresponding settings.dbo.ActPhase
Activity Phase groupsdbo.ActVat
Activity tax table
FINANCIALS
Refer to the following article.
dbo.ArpAccount
Resource table for Vendors.dbo.ArpVat
Tax accounts used for Vendorsdbo.FinAccounts
General Ledgerdbo.FinPosting
Header table for Project Postingsdbo.FinPostingEntry
Line level table for Project Postingsdbo.FinJournal
Header table for Journal Postingsdbo.FinJournalEntry
Line level table for Journal Postingsdbo.ProfitForecast
Header table for Net Revenue Forecastsdbo.ProfitForecastData
Line level table for Net Revenue Forecasts
TIME REGISTRATION AND CAPACITY
Refer to the following article.
dbo.TimeReg
Line level table for employee time registrationsdbo.Cap
Line level table for employee capacity. Day level.dbo.CapUsed
Line level table for employee booked time. Day level.
JOB RELATED TABLES
Refer to the following article.
dbo.Job
Main Job List tabledbo.RessProjekter
Main Project List table for Jobs.dbo.JobInvoice
Header level table for Job Invoicesdbo.JobFakturaAct
Line level table for Job Invoicesdbo.JobPrice
Header level table for Job Price Quotesdbo.JobPriceActivity
Line level table for Job Price Quotesdbo.JobReq
Header level table for Job Purchase Ordersdbo.JobAjustment
Header level table for Job Adjustments
RESOURCES
Refer to the following article
dbo.Ress
Main Resource List table, contains all resource typesdbo.Emp
Employee List tabledbo.Cust
Customer List table
HELPFUL NOTES
UAT RECOMMENDED
When testing SQL and databoards, it is always recommended to use your UAT system. Running large datasets without filtering could possibly cause speed issues for others logged in.
USE FILTERING
When testing, and especially when exploring the database, it is recommended to limit your results.
For example, limit the results to a specific or specific companies:
WHERE CompId IN (123,321)
And/Or, a date range:
WHERE RegDate BETWEEN '2024-01-01' AND '2024-01-31'
ENUMERATION TYPES
WorkBook has many different things that will use enums. For example, if you look at the dbo.Job table, you will notice Job Status Id, but no Job Status Description.
The following table holds most enums: dbo.wbEnum
A way search for the Enum required for Job Status might be:
SELECT * FROM wbEnum WHERE EnumDesc LIKE '%Invoiced%'
You will see a returned table such as:
EnumId | EnumHdrId | EnumVal | EnumName | EnumDesc |
---|---|---|---|---|
1059 | 33 | 4 | Invoiced/Finalized | Invoiced |
Here you can see a few things you’ll need. EnumHdrId and EnumVal
EnumVal would match the value on the job, and EnumHdrId is the header which you would want to limit to.
For an example of how to join this enum to the Job table, to list the Job Status Description by Job, you could use the following:
© Tangram 2022. All rights reserved.