I have the SQL query to summarize the following attributes:
SELECT [tocid]
,sum(cast([img_size] as bigint)) + sum(cast([txt_size] as bigint)) + sum(cast([loc_size] as bigint)) as totaldocsize
into [Laserfiche_Reporting].[dbo].[BI_totaldoc]
FROM [Laserfiche_ProductionReporting_IntertrustAmsterdam].[dbo].[doc]
group by tocid
I added the total to the toc.edoc_size
,[Laserfiche_ProductionReporting_IntertrustAmsterdam].[dbo].[toc].[edoc_size] +
[Laserfiche_Reporting].[dbo].[BI_totaldoc].[totaldocsize] as TotalDocumentSize
Since the outcome of the followings is so pretty low, I can disregard it:
,isnull(cast(datalength([bitmap]) as bigint), 0) as bitmap
,isnull([attach_size], 0) as attach_size
,isnull(cast(datalength([ann_text]) as bigint), 0) as ann_text
With all above in place, I thought I have the sum of the Total Document Size, however some documents is showing the <null> value. 180.000 documents in well over 5.000.000 documents I cannot see what the cause is, anyone an idea?