Find all missing intervals (nulls) in one table using another table with a complete list


I have 2 tables:
  • Table A has a complete list of quarter hour intervals for a 24 hour day. Table B has a store with it's average ticket count in quarter hour intervals.

My problem is that there are missing intervals in table B. I would like to use table A to find all nulls or missing intervals in table B.

Is there a method? I tried a left join from the only column in Table A to B but the SQL won't show the nulls in Table B.
Ryan SimmonsBusiness Analyst IIIAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Scott PletcherSenior DBACommented:
Need the SELECT statement.  Directly usable test data (CREATE TABLE and INSERT statement(s)) would also help tremendously.
Ryan SimmonsBusiness Analyst IIIAuthor Commented:
I went through the exercise of creating the two test tables and the select statement using creation scripts which match the data types of the original tables. However all it is showing me is that a left join should be working. Not sure why it is not working with actual data.

Continuing to investigate this... I will report back if I find a fix.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Ryan SimmonsBusiness Analyst IIIAuthor Commented:
No other responses...
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.