Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

To find the difference in NULL values, Please help..

Capture.PNG

I need to subtract null values(12495000 - 12494342) and display in DIFFERENCE column. Please help..

2 Replies
rustyfishbones
Master II
Master II

It depends on what you are trying to do

but you can change if it's a list box to treat a null symbol as 0

2013-11-12_2339.png

Not applicable
Author

I created a Chart as table with 2 data sources as part of ETL testing on the key  BUSINESS_PLAN_RCVD_DT_SBL:

1. SELECT (CASE WHEN PRTNR_TYPE_CD IS NOT NULL THEN c.[X_BUS_PLAN_RECVD_DT]
ELSE NULL
END) AS BUSINESS_PLAN_RCVD_DT_SBL, COUNT(1) AS BUSINESS_PLAN_RCVD_DT_SBL
from COMMON.dbo.W_SBL_S_EXT c

GROUP BY (CASE WHEN PRTNR_TYPE_CD IS NOT NULL
THEN c.[X_BUS_PLAN_RECVD_DT]
ELSE NULL
END)
ORDER BY 2;

2. SELECT BUSINESS_PLAN_RCVD_DT AS BUSINESS_PLAN_RCVD_DT_SBL,

COUNT(1) AS BUSINESS_PLAN_RCVD_DT_GDW

FROM GDW.dbo.T_DIM_ACCOUNT
WHERE SRC_APP_CD = 'SBL' AND SRC_DELETE_FLG = 'N'
GROUP BY BUSINESS_PLAN_RCVD_DT
ORDER BY 2;

thye both have NULL vallues but not in the same row..