locked
SSRS Report not returning null values RRS feed

  • Question

  • Trying to get a query to work (and match the Advanced Find results).  I am summing values of a field, but using criteria in the WHERE clause to filter.  The issue is since I am telling the query not to use records with "loanstructuretype" 1,2 or 4, if the record is null for that field, they also do not get returned, but I want to include the records.

    Here is the WHERE clause:

    WHERE FilteredSystemUser.businessunitidname = 'Retail Relationship Management' AND
    FilteredSynact_Loan.statuscode = '7' AND
    FilteredSynact_Loan.synact_loantype <> '19' AND
    FilteredSynact_Loan.synact_loantype <> '20' AND
    FilteredSynact_Loan.synact_loanstructuretype <> '1' AND
    FilteredSynact_Loan.synact_loanstructuretype <> '2' AND
    FilteredSynact_Loan.synact_loanstructuretype <> '4'

    I thought the answer might be ISNULL, but could not figure it out.  Any help is appreciated.

     


    Ken Compter
    Friday, December 16, 2011 7:24 PM

Answers

  • Got it to work as below:

    WHERE FilteredSystemUser.businessunitidname = 'Retail Relationship Management' AND
    FilteredSynact_Loan.statuscode = '7' AND
    (FilteredSynact_Loan.synact_grbgroup = '1' OR
    FilteredSynact_Loan.synact_grbgroup = '2' OR
    FilteredSynact_Loan.synact_grbgroup = '4' OR
    (FilteredSynact_Loan.synact_grbgroup = '3' AND
    FilteredSynact_Loan.synact_loanstructuretype = '3')) AND
    FilteredSynact_Loan.synact_loantype <> '19' AND
    FilteredSynact_Loan.synact_loantype <> '20'

    Maybe this will help someone else as well.

     


    Ken Compter
    • Marked as answer by kcompter Friday, December 16, 2011 8:49 PM
    Friday, December 16, 2011 8:48 PM