I am having an issue with a SQL Select statement that comes from an existing application and getting it to always return a value for certain fields.
SQL
SELECTB.RIN,B.Year,B.Parcel,B.Principal,B.Penalty,0.00asSpecials,B.InterestDateTime,B.District,B.Interest,I.InterestRate,T.TaxesPaid,T.PenaltyPaid,T.InterestPaid,T.SpecialsPaid,dbo.coins_days360(B.InterestDateTime,GetDate())DaysElapsedFROMTRBackBLEFTJOINTRIRateIonI.Year=B.YearLEFTJOIN(SELECTYear,Parcel,SUM(casewhenTransType='R'thenPaymentelse0end)TaxesPaid,SUM(casewhenTransType='P'thenPaymentelse0end)PenaltyPaid,SUM(casewhenTransType='I'thenPaymentelse0end)InterestPaid,SUM(casewhenTransType='S'thenPaymentelse0end)SpecialsPaidFROMTRBackTransGROUPBYYear,Parcel)TonT.Year=B.YearandT.Parcel=B....