My database has null value in one filed but in report it shows blank column.How do I fix that?

  •  

    In database if there is no value in some field it shows null but in report it shows blank column.How do I fix that?I want it should either show null or some message.

     

    This is my query.I want if DownloadDate is nul it should not show blank column it should show either null or some message.

     

    SELECT

    tblSuperClientFile.ClientRefNo AS LoanNumber, tblReferral.RefId AS NTRID, tlkpReferralStatus.StatusDescr AS Status, tblDownloadTrackingHistory.DownloadDate, tblReferralTransferStatus.DateModified

    FROM

    tblReferralTransferStatus AS tblReferralTransferStatus WITH (nolock) INNER JOIN

    tlkpReferralStatus

    AS tlkpReferralStatus WITH (nolock) ON tblReferralTransferStatus.RefStatusId = tlkpReferralStatus.RefStatusId INNER JOIN

    tblReferral

    AS tblReferral WITH (nolock) ON tblReferralTransferStatus.RefId = tblReferral.RefId AND

    tblReferralTransferStatus

    .VendorId = tblReferral.AssignedVendorId INNER JOIN

    tblSuperClientFile

    AS tblSuperClientFile WITH (nolock) ON tblReferral.ClientFileid = tblSuperClientFile.ClientFileId LEFT OUTER JOIN

    tblReferralTracking

    ON tblReferralTransferStatus.NewRefId = tblReferralTracking.NewRefID LEFT OUTER JOIN

    tblDownloadTrackingHistory

    ON tblReferralTracking.HistoryId = tblDownloadTrackingHistory.HistoryId

    WHERE

    (tblReferralTransferStatus.RefStatusId < 6 OR

    tblReferralTransferStatus

    .RefStatusId > 10) AND (tblReferralTransferStatus.VendorId = 356) AND

    (tblReferralTransferStatus.DateModified >= '2006-07-26 16:48:24.837' AND tblReferralTransferStatus.DateModified < '2007-04-24 08:49:50.200')

  • ...., ISNULL(tblDownloadTrackingHistory.DownloadDate,'No download date specified'),....

    another thing, why don't you try to use table aliasing so that you query becomes more readable

    SELECT tblSuperClientFile.ClientRefNo AS LoanNumber,....

    from ... tblSuperClientFile ...

    becomes

    SELECT SCF.ClientRefNo AS LoanNumber,....

    from ... tblSuperClientFile SCF...

     


    Everything you can imagine is real.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply