我正在使用这个存储过程从SQL数据库中检索数据。一些数据点用-9999或9999表示不好,我想剔除不好的数据并替换为空值。在这个存储过程中有什么方法可以做到这一点吗?VariableID WHERE SiteID = 3 and VariableID IN (1,2,4,6,7,8,9,10,11)PIVOT
在这个简单的数据透视示例( the )中,我试图用0替换NULL。我已经尝试了我找到的所有建议,但仍然无效。如何将枢轴中的空值替换为0from select ISNULL([vendid],0)as [vendid],isnull(origdocamt,0)as origdocamtfrom APDocpivot
(sum(origdocamt) for vend
Month,InvDt), 3) as [Month], from tblInvoice where TenantId =-xxxxxxxx pivotfor [Month] in(Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep,
但是这里有这么多的空值,所以我想用零替换这些空值。