I All............ I have Summary and Detail reports from these two reports i have to count the number of unmatched records between two dates,,but am getting different results .....am giving the query for two reports ...... these reports are developed using version 7.4 Summary Report Query select count(*) from msw.MSWPTTCOSH T1 where T1.I_LOC_PKUP NOT in ('08072', '08068', '08455') and T1.I_TRNSMODE in ('M', 'GS', 'X', 'RR', 'GR', 'R') and (T1.I_LOC_PKUP <> '06203' or T1.I_LOC_DELV <> '02452') and NOT (T1.I_LOC_PKUP = '00074') and case when (T1.T_SHPMT >= '05.00.00') then T1.D_SHPMT else DATE(TIMESTAMP(SYSFUN.TIMESTAMP_ISO(T1.D_SHPMT))+( -1) DAYS) end <= '2010-10-31' and case when (T1.T_SHPMT >= '05.00.00') then T1.D_SHPMT else DATE(TIMESTAMP(SYSFUN.TIMESTAMP_ISO(T1.D_SHPMT))+( -1) DAYS) end >= '2010-10-01' and T1.I_LOC_FINAL_DEST in ('02452', '02459', '02460', '02462', '04012', '04015', '04025', '04070', '04087', '04088', '06221', '06231', '08475', '08481', '08483', '09103', '09106', '09126', '04506', '05108', '05111', '05202', '05203', '05205', '05207', '05208', '05209', '05213', '05221', '05222', '05231', '05304', '05305', '05308', '05310', '05320', '05327', '05403', '05404', '05405', '05406', '05407', '06203', '06204', '06215', '06219', '06220', '06224', '07405', '07902', '08474', '08476', '08477', '08480', '08482', '08484', '08486', '08490', '09104', '09111', '09127', '04503', '04529') and T1.L_CARR_MTCH = 'N' and T1.C_CARR_SCAC_ORIG = 'TVMC' Detail Report Query select count(*) from msw.MSWPTTCOSH T1 where T1.I_LOC_PKUP NOT in ('08072', '08068') and T1.I_TRNSMODE in ('M', 'GS', 'X', 'RR', 'GR', 'R'.'LT') and (T1.I_LOC_PKUP <> '06203' or T1.I_LOC_DELV <> '02452') and NOT (T1.I_LOC_PKUP = '00074') and T1.D_SHPMT <= '2010-10-31' and T1.D_SHPMT >= '2010-10-01' and T1.I_LOC_FINAL_DEST in ('02452', '02459', '02460', '02462', '04012', '04015', '04025', '04070', '04087', '04088', '06221', '06231', '08475', '08481', '08483', '09103', '09106', '09126', '04506', '05108', '05111', '05202', '05203', '05205', '05207', '05208', '05209', '05213', '05221', '05222', '05231', ' 05304', '05305', '05308', '05310', '05320', '05327', '05403', '05404', '05405', '05406', '05407', '06203', '06204', '06215', '06219', '06220', '06224', '07405', '07902', '08474', '08476', '08477', '08480', '08482', '08484', '08486', '08490', '09104', '09111', '09127', '04503', '04529') and T1.L_CARR_MTCH = 'N' and T1.C_CARR_SCAC_ORIG = 'TVMC' |