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 8923711
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T07:12:41+00:00 2026-06-15T07:12:41+00:00

I have been getting requests that require me to query up to 1,000 account

  • 0

I have been getting requests that require me to query up to 1,000 account numbers against a several different tables.

I am looking for an easy way to determine which account numbers are not found in the tables I am querying.

For Example:

    select
        a.account#
        a.date
        a.amount
    from
        transactiontable as A
    where
        a.account# in ('1','2','3','4')

If account# 3 is not in this table, the account is not shown at all and my result will look like:

     Account# | Date | Amount
    --------------------------
         1    | 8/31 | $2.50
         2    | 8/31 | $7.25
         4    | 8/31 | $0.63

With only 4 account numbers, its easy to determine what one is missing. With 1,000+ account numbers is can be very difficult if not impossible to find out which are missing. I can’t use a “NOT IN” clause as that will return tens of thousands of records I am not looking for.

I’ve experimented doing a variety of joins with a master table that has all account numbers, but have had no success.

Is there a quick way in sql studio to determine what account numbers are missing? Or is there a way to code the query to get a result that looks more like this?

     Account# | Date | Amount
    --------------------------
         1    | 8/31 | $2.50
         2    | 8/31 | $7.25
         3    | NULL |  NULL
         4    | 8/31 | $0.63
  • 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-06-15T07:12:42+00:00Added an answer on June 15, 2026 at 7:12 am

    Or is there a way to code the query to get a result that looks more like this?

    OUTER JOIN your transaction table with your Accounts table. SELECT your Account# from the Accounts table, and your remaining fields from your transactions table. This will produce records for every Account, but null data for those accounts with no corresponding transactions.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've taken a screenshot of the compiler inconsistencies that I have been getting when
On several of my adsense running sites, I have been getting the following errors:
I've got a table that people have been inserting into getting the primary key
I keep getting errors that my functions have been defined multiple times. Of course
I have been getting an invalid character! on what looks like the £ sign
I have been working on getting this seat mapping chart for a while and
I have been working on getting a mail app to work from a tutorial
I have been working on getting my OSGi application to run outside eclipse. It
I have been trying to find a way of getting a windows batch file
I have been trying to figure out why I am getting this problem and

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.