GeneralJournalEntryLines 中缺少字段 CreatorFullName 和 ModifierFullName 的内容

Missing content of field CreatorFullName and ModifierFullName in GeneralJournalEntryLines

业务对象 GeneralJournalEntryLines 包含 Exact Online 的 GL 交易行。出于性能调整的原因,我们正在更改将数据从 Exact Online 复制到我们的内部部署数据库的脚本,以仅包含可能的更改而不是完整副本。

但是,对与 GeneralJournalEntryLines 连接的 GeneralJournalEntries 的查询有时 returnsCreatorFullName 和 ModifiedFullName 中的空值。

我已尝试重现具有此问题的新行,但效果很好。

这是数据库损坏吗?还是我这边的连接错误?

Exact Online 查询是:

use <DIVISION CODE>

select GE.Created GE_Created
      ,GE.Division GE_Division
      ,GE.EntryID GE_EntryID
      ,GE.EntryNumber GE_EntryNumber
      ,GE.FinancialPeriod GE_FinancialPeriod
      ,GE.FinancialYear GE_FinancialYear
      ,GE.JournalCode GE_JournalCode
      ,GE.Modified GE_Modified
      ,GE.Reversal GE_Reversal
      ,GE.Status GE_Status
      ,GE.Type GE_Type
      ,GL.AccountCode GL_AccountCode
      ,GL.AmountDC GL_AmountDC
      ,GL.AmountVATDC GL_AmountVATDC
      ,GL.AssetCode GL_AssetCode
      ,GL.CostCenter GL_CostCenter
      ,GL.CostUnit GL_CostUnit
      ,GL.CreatorFullName GL_CreatorFullName
      ,GL.Date GL_Date
      ,GL.Description GL_Description
      ,GL.GLAccountCode GL_GLAccountCode
      ,GL.LineNumber GL_LineNumber
      ,GL.ModifierFullName GL_ModifierFullName
      ,GL.OurRef GL_OurRef
      ,GL.ProjectCode GL_ProjectCode
      ,GL.Quantity GL_Quantity
      ,GL.VATBaseAmountDC GL_VATBaseAmountDC
      ,GL.VATCode GL_VATCode
      ,GL.VATPercentage GL_VATPercentage
      ,GL.VATType GL_VATType
from       ExactOnlineREST..GeneralJournalEntries GE
inner join ExactOnlineREST..GeneralJournalEntryLines GL
on GE.EntryID=GL.EntryID
where GE.Status <> 50 
or ( GE.Status = 50 and ( (GE.FinancialYear*100) + GE.FinancialPeriod = 201501 and GE.Modified > '09/01/2017 14:03:09' ) ) 
or ( GE.Status = 50 and ( (GE.FinancialYear*100) + GE.FinancialPeriod = 201502 and GE.Modified > '09/01/2017 14:03:09' ) ) 
or ( GE.Status = 50 and ( (GE.FinancialYear*100) + GE.FinancialPeriod = 201503 and GE.Modified > '09/01/2017 14:03:09' ) ) 
or ( GE.Status = 50 and ( (GE.FinancialYear*100) + GE.FinancialPeriod = 201504 and GE.Modified > '09/01/2017 14:03:09' ) ) 
or ( GE.Status = 50 and ( (GE.FinancialYear*100) + GE.FinancialPeriod = 201505 and GE.Modified > '09/01/2017 14:03:08' ) ) 
or ( GE.Status = 50 and ( (GE.FinancialYear*100) + GE.FinancialPeriod = 201506 and GE.Modified > '09/01/2017 14:03:08' ) ) 
or ( GE.Status = 50 and ( (GE.FinancialYear*100) + GE.FinancialPeriod = 201507 and GE.Modified > '09/01/2017 14:27:27' ) ) 
or ( GE.Status = 50 and ( (GE.FinancialYear*100) + GE.FinancialPeriod = 201508 and GE.Modified > '09/01/2017 14:27:27' ) ) 
or ( GE.Status = 50 and ( (GE.FinancialYear*100) + GE.FinancialPeriod = 201509 and GE.Modified > '09/01/2017 14:27:27' ) ) 
or ( GE.Status = 50 and ( (GE.FinancialYear*100) + GE.FinancialPeriod = 201510 and GE.Modified > '09/01/2017 14:27:26' ) ) 
or ( GE.Status = 50 and ( (GE.FinancialYear*100) + GE.FinancialPeriod = 201511 and GE.Modified > '09/01/2017 14:27:27' ) ) 
or ( GE.Status = 50 and ( (GE.FinancialYear*100) + GE.FinancialPeriod = 201512 and GE.Modified > '09/01/2017 14:27:26' ) ) 

local export results as "D:\Invantive\data\uit_EOL570GeneralJournals.csv" format csv

local exit

使用查询时:

select * 
from   ExactOnlineREST..GeneralJournalEntryLines GL
where  gl.modifierfullname is null or gl.creatorfullname is null

似乎所有缺少 modifiedfullnamecreatorfullname 的行都有一个来自短列表的关联用户 GUID。它也是(基于创建日期)相当大的年龄的所有记录。

似乎 Exact Online API 在内部与用户 table 进行了左外连接,对于不再活跃的用户 return 没有信息。