Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 986143
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T05:16:24+00:00 2026-05-16T05:16:24+00:00

When I run a simple SELECT statement on this table I get a row

  • 0

When I run a simple SELECT statement on this table I get a row back (this is correct there should only be one). Here is that SELECT statement:

select * from Lending.HMDA where BatchId = 1

Here is the proc I am executing, which returns no rows:

    DECLARE @BatchStartDate datetime, @BatchEndDate datetime

    SELECT @BatchStartDate = StartDate, @BatchEndDate = EndDate  FROM Lending.HMDAReportBatch WHERE BatchId = 1

    -- HMDA And App Data
    SELECT
    A.ApplicationId,
    A.CreatedDate,
    LU14.LookupCode AS LoanTypeId,
    LU1.LookupCode AS PropertyTypeId,
    LU2.LookupCode AS LoanPurposeId,
    LU3.LookupCode AS OwnerOccupancyId,
    L.FinalLoanAmount,
    LU4.LookupCode AS PreApprovalId,
    LU5.LookupCode AS ActionId,
    A.ActionDate,
    H.MSA,
    LU6.MiscCode1 AS StateId,
    LU7.LookupCode AS CountyId,
    H.CensusTract,
    LU8.LookupCode AS ApplicantEthnicityId,
    LU9.LookupCode AS JointEthnicityId,
    H.IsApplicantRaceAmericanIndian,
    H.IsApplicantRaceAsian,
    H.IsApplicantRaceBlack,
    H.IsApplicantRaceIslander,
    H.IsApplicantRaceNA,
    H.IsApplicantRaceNotProvided,
    H.IsApplicantRaceWhite,
    H.IsJointRaceAmericanIndian,
    H.IsJointRaceAsian,
    H.IsJointRaceBlack,
    H.IsJointRaceIslander,
    H.IsJointRaceNA,
    H.IsJointRaceNotProvided,
    H.IsJointRaceWhite,
    LU10.LookupCode AS ApplicantGenderId,
    LU11.LookupCode AS JointGenderId,
    LU12.LookupCode AS LoanPurchaserId,
    H.IsDenialReasonCash,
    H.IsDenialReasonCollateral,
    H.IsDenialReasonCreditHistory,
    H.IsDenialReasonDTI,
    H.IsDenialReasonEmploymentHistory,
    H.IsDenialReasonIncomplete,
    H.IsDenialReasonInverifiableInfo,
    H.IsDenialReasonMortgageInsuranceDenied,
    H.IsDenialReasonOther,
    H.RateSpread,
    H.IsHOEPA,
    LU13.LookupCode AS LienStatusId
    --@BatchStartDate AS BatchStartDate,
    --@BatchEndDate AS BatchEndDate
    FROM Lending.HMDA H
    INNER JOIN Lending.Application A ON H.ApplicationId = A.ApplicationId
    INNER JOIN Lending.Loan L ON H.ApplicationId = L.ApplicationId
    INNER JOIN tblLookup AS LU1 ON H.PropertyTypeId = LU1.LookupID
    INNER JOIN tblLookup AS LU2 ON H.LoanPurposeId = LU2.LookupID
    INNER JOIN tblLookup AS LU3 ON H.OwnerOccupancyId = LU3.LookupID
    INNER JOIN tblLookup AS LU4 ON H.PreApprovalId = LU4.LookupID
    INNER JOIN tblLookup AS LU5 ON H.ActionId = LU5.LookupID
    INNER JOIN tblLookup AS LU6 ON H.StateId = LU6.LookupID
    INNER JOIN tblLookup AS LU7 ON H.CountyId = LU7.LookupID
    INNER JOIN tblLookup AS LU8 ON H.ApplicantEthnicityId = LU8.LookupID
    INNER JOIN tblLookup AS LU9 ON H.JointEthnicityId = LU9.LookupID
    INNER JOIN tblLookup AS LU10 ON H.ApplicantGenderId = LU10.LookupID
    INNER JOIN tblLookup AS LU11 ON H.JointGenderId = LU11.LookupID
    INNER JOIN tblLookup AS LU12 ON H.LoanPurchaserId = LU12.LookupID
    INNER JOIN tblLookup AS LU13 ON H.LienStatusId = LU13.LookupID
    INNER JOIN tblLookup AS LU14 ON H.LoanTypeId = LU14.LookupID

    WHERE H.BatchId = 1  AND H.IsExcluded <> 'True'

Why is the proc not returning any data? What could be the possible scenario in which this would happen?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T05:16:24+00:00Added an answer on May 16, 2026 at 5:16 am

    Possible scenarios:

    • No rows where H.BatchId = 1 AND H.IsExclueded <> ‘True’
    • No matching rows in table Application
    • No matching rows in table Loan
    • No matching rows in tblLookup for PropertyTypeId
    • No matching rows in tblLookup for LoanPurposeId
    • No matching rows in tblLookup for OwnderOccupancyId
    • No matching rows in tblLookup for OreApprovalId
    • No matching rows in tblLookup for ActionUId
    • No matching rows in tblLookup for StateId
    • No matching rows in tblLookup for CountyId
    • No matching rows in tblLookup for ApplicantEthnicityId
    • No matching rows in tblLookup for JointEthnicityId
    • No matching rows in tblLookup for ApplicantGenderId
    • No matching rows in tblLookup for JointGenderId
    • No matching rows in tblLookup for LoadPurchaserId
    • No matching rows in tblLookup for LienStatusId
    • No matching rows in tblLookup for LoanTypeId
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 484k
  • Answers 484k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer I think what it does is replacing illegal code units… May 16, 2026 at 7:28 am
  • Editorial Team
    Editorial Team added an answer Make sure that you have uncommented the extension from the… May 16, 2026 at 7:28 am
  • Editorial Team
    Editorial Team added an answer JavaScript is a programming language. Ajax is a thing you… May 16, 2026 at 7:28 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.