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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T04:54:20+00:00 2026-05-26T04:54:20+00:00

I am working on a NOT EXISTS and it is not turning out like

  • 0

I am working on a NOT EXISTS and it is not turning out like it is supposed to. There should only be 2 results that should have showed up but I got 18. I am supposed to find all book titles (as ‘book title’) that have not had any sales in the database. For some reason I think I am forgetting something in the query but I am not sure. I don’t understand why it’s not working correctly.

Select title AS 'Book Title'
From titles
WHERE NOT EXISTS
(Select ord_num
    From sales
    Where title = ord_num)
  • 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-26T04:54:21+00:00Added an answer on May 26, 2026 at 4:54 am

    It looks as though you are trying to find sales records where the title is the same as the order number, in your EXISTS clause. I suggest something like:

    Select title AS 'Book Title'
    From titles
    WHERE NOT EXISTS
    (Select ord_num
        From sales
        Where titles.title_id = sales.title_id)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Working in Delphi7 just now, I noticed that not only a VarIsEmpty function exists,
This question is similar to Find conditions like 'NOT EXISTS' except that it's working
I've found this snippet: http://fssnip.net/8o But I'm working not only with retriable functions, but
Why is the following code not working? if(EventLog.Exists(Foo)) { EventLog.Delete(Foo); } if(EventLog.Exists(Foo) == false)
MUTANT TABLE DOES NOT EXIST.MY QUERY IS WORKING FINE BUT WHEN I AM TRYING
I'm trying to make a simple form, but it's working not so fine. This
I was trying someting like: Select Items From Table1 Where Not Exists ( Select
Ok, so you have something like this working. You Insert into a table from
I have not worked with DOS much as there were always shell scripting in
In my code I am checking whether variables exist. But it is not turning

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.