0
業務對象GeneralJournalEntryLines包含Exact Online的GL事務處理行。出於性能調整的原因,我們正在更改將數據從Exact Online複製到我們的內部部署數據庫的腳本,以便在可能的情況下僅包含更改,而不是完整的副本。GeneralJournalEntryLines中缺少字段CreatorFullName和ModifierFullName的內容
但是,在GeneralJournalEntries上加入GeneralJournalEntryLines的查詢有時會在CreatorFullName和ModifiedFullName中返回空值。
我試着重現這個問題的新行,但那些工作正常。
這是數據庫損壞嗎?或者我身邊的加入錯誤?
的精確在線查詢:
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_EOL\40570GeneralJournals.csv" format csv
local exit
那麼你的審計歷史就消失了? –
@PatrickHofman是的,似乎是這樣。除非您通過在Exact Online的用戶表中註冊所有新記錄,在另一個表中註冊與名稱的關係GUID。奇怪的是,預計用戶會被禁用而不是被刪除,但也許可能是德國的立法。 –