SELECT 查询无法识别我用作 ID 的十进制值时出现问题

问题描述 投票:0回答:0

我有两个不同观察/行的两个 ID 值。一个 ID 是

50045.41
,另一个 ID 是
50045.42
。 SELECT 查询(下面的两个示例)将选择
50045.41
的所有内容,但完成后不会选择任何观察结果
WHERE cupnxp = 50045.42

SELECT *  FROM  T_4003_Analysis WHERE cupnxp = 50045.41;

SELECT *  FROM T_4006_Infusion WHERE cupnxp = 50045.41;

两个 ID 都存储在表的同一列中,但不知何故,一个 ID 被识别并选择,而另一个 ID 则未被识别和选择。

50045.41
cupnxp ID 是使用更新查询生成的:

UPDATE T_Incoming SET T_Incoming.upnx = [CUPN]+[C]/10, T_Incoming.cupnx = [CUPN]+[C]/10, T_Incoming.UPN = IIf([UPN] Is Null,[CUPN],[UPN]), T_Incoming.cupnxp = [CUPN]+[C]/10+0.01, T_Incoming.cupnxpi = [CUPN]+[C]/10+0.011  WHERE (((T_Incoming.ADD)=Yes));

然后我运行下一个查询(但我认为这不会导致 cupnxp 一代出现任何问题):

INSERT INTO T_4003_CellProd ( upnx, cupnx, CUPN, cupnxp, Name, MRN, CRID ) SELECT T_Incoming.upnx, T_Incoming.cupnx, T_Incoming.CUPN, T_Incoming.cupnxp, T_Incoming.Name, T_Incoming.MRN, T_Incoming.CRID FROM T_Incoming WHERE (((T_Incoming.ADD)=Yes));

使用追加查询将

50045.42
cupnxp ID 添加到 T_4003_Analysis 表中:

INSERT INTO T_4003_Analysis ( upnx, cupnx, CUPN, cupnxp, Name, MRN, CRID ) SELECT T_4003_CellProd.upnx, T_4003_CellProd.cupnx, T_4003_CellProd.CUPN, [cupnxp]+0.01 AS Expr1, T_4003_CellProd.Name, T_4003_CellProd.MRN, T_4003_CellProd.CRID FROM T_4003_CellProd WHERE (((T_4003_CellProd.multi_prod)=True)); 

50045.42
cupnxp ID 也使用附加查询添加到 T_4006_Infusion 表中:

INSERT INTO T_4006_Infusion ( upnx, cupnx, CUPN, cupnxp, cupnxpi, Name, MRN, CRID ) SELECT T_4003_CellProd.upnx, T_4003_CellProd.cupnx, T_4003_CellProd.CUPN, [T_4003_CellProd].[cupnxp]+0.01 AS Expr1, [T_4003_CellProd].[cupnxp]+0.011 AS Expr2, T_4003_CellProd.Name, T_4003_CellProd.MRN, T_4003_CellProd.CRID FROM T_4003_CellProd INNER JOIN T_4006_Infusion ON T_4003_CellProd.ProductID = T_4006_Infusion.ProductID WHERE (((T_4003_CellProd.multi_prod)=True));

这里有什么东西会导致简单的 SELECT 查询对这两个

cupnxp
值进行不同的处理吗?我完全不知道这两个值怎么可能都是十进制值,但第二个值不能被 SELECT 识别。

sql ms-access-2016
© www.soinside.com 2019 - 2024. All rights reserved.