在一个运行良好多年的系统上 - 就在今天,我注意到一个错误。
脑洞大开的简单
SELECT InvoiceID
FROM t_Invoices
WHERE DocumentNumber = 3841734
Run Code Online (Sandbox Code Playgroud)
现在给出一个错误:
转换 varchar 值“3841730”时转换失败。到数据类型int。
我不知道 3841730 值来自哪里(尽管它可疑地接近 DocumentNumber 值 - 3841734)我只选择 InvoiceID 那么为什么会出现此错误。
该行的所有数据如下:
InvoiceID DocumentNumber Date_Created IsActive Date_LastOperated Date_Closed WF_CurrentState WF_PreviousState WF_CurrentUser WF_CurrentCredDeptUser WF_InitialCredDeptUser WF_PreviousUser WF_WithCreditorsDept ApprovedAboveLimit Approved DocumentSpec CostCentreID Date_Due PaymentInterestComment PaymentInterestFlag PaymentInterestCommentFreeText DocumentSpecOriginal
832128 3841734 2021-04-23 08:57:05.000 1 2021-04-23 08:57:05.000 NULL 1 1 15 15 15 15 1 0 0 \\invoicerouting\DocumentStore\2021\04-Apr\UP-20210423-3841734.pdf 1 NULL NULL NULL NULL NULL
Run Code Online (Sandbox Code Playgroud)
谢谢