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

  • Home
  • SEARCH
  • 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 6553511
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T12:35:25+00:00 2026-05-25T12:35:25+00:00

I have 2 Tables. I want to extract every TB2_ID in Table 2 for

  • 0

I have 2 Tables. I want to extract every TB2_ID in Table 2 for which certain conditions are fulfilled in Table 1. So in the case below, we would extract ‘2’ since it is FULLY fulfilled by both ID ‘1’ and ’15’ in Table 1. TB2_ID ‘4’ would not be extracted since there is no TB1_ID that FULLY fulfills it (i.e. if TB1_ID ’16’ also had a condition of 10, then TB2_ID ‘4’ would be extracted). I am using Oracle SQL 10g.

Table 1 looks like:

TB1_ID    |  Condition
______________________

   1      |      10
   1      |      11
   1      |      12
   5      |      10
   5      |      11
   15     |      10
   15     |      11
   15     |      12
   16     |      11
   16     |      14

Table 2 looks like:

 TB2_ID   |    Condition
 _______________________

   2      |       10
   2      |       11
   2      |       12
   4      |       10
   4      |       14
  • 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-25T12:35:26+00:00Added an answer on May 25, 2026 at 12:35 pm

    This can most simply specified as: Find any TB2_ID that is not satisfied in table 1:

    SELECT DISTINCT TB2_ID
    FROM table2 t2
    left join table1 t1 on t1.TB1_ID = t2.TB2_ID and t1.Condition = t2.Condition
    where t1.TB1_ID is null;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have 2 tables which I want to query from. The first table (lets
I have a big problem. I want to extract text from html table that
I have following data in my table. alt text http://img26.imageshack.us/img26/3746/productfield.png I want to extract
I have two tables which I want to join together using a left outer
I have three mysql tables that I would like to extract some information from,
I have a script to extract certain data from a much bigger table, with
I have a table and want to use Nokogiri to extract the content of
I have a SQL Server 2008 DB. I want to extract SOME tables (and
I have a database and i want to extract result based on two table
I have a table with a column that I want to extract out 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.