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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T10:22:08+00:00 2026-05-27T10:22:08+00:00

Here is an example row found in both tableA and TableB: col1 col2 col3

  • 0

Here is an example row found in both tableA and TableB:

 col1   col2    col3
123  |  asdf  |  ddd

I was going to try to use a CTE To retrieve this value, but i have only got it to work with one column at a time.

Here is what i have so far, but right now I am stumped.

    ;with cte as (
     SELECT  A.col1
          ,A.col2
      FROM tableA A
        )

    select col1, col2 from cte where col1, col2

    not in (select col1, col2 from FHU.dbo.HolidayCallers)

And just to reiterate i am expecting output to be the original sample row up top.

  • 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-27T10:22:09+00:00Added an answer on May 27, 2026 at 10:22 am

    Based on your question, you’d could use EXISTS to find rows where the related columns are in both tables.

    SELECT a.ConversationID, a.SendDateUtc
        FROM tableA a
        WHERE EXISTS(SELECT NULL
                         FROM FHU.HolidayCallers hc
                         WHERE a.ConversationID = hc.ConversationID
                             AND a.SendDateUtc = hc.SendDateUtc);
    

    BUT, based on the sample code you provided, it seems like you are looking for a NOT EXISTS condition:

    SELECT a.ConversationID, a.SendDateUtc
        FROM tableA a
        WHERE NOT EXISTS(SELECT NULL
                             FROM FHU.HolidayCallers hc
                             WHERE a.ConversationID = hc.ConversationID
                                 AND a.SendDateUtc = hc.SendDateUtc);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I found a great C++/ODBC example here ... The project I downloaded builds great
Here is an example of what I've got going on: CREATE TABLE Parent (id
Based on example found here but I guess I'm not understanding it. This works
The fictional example here. Suppose I designed a class named IODevice. This class already
This problem is not readily reproducible in a simple example here but was wondering
OK, probably best to give an example here of what I mean. Imagine a
What does this do? I find the example here, but other than what it
I would like to translate or 301-redirect urls such as: www.domain.com/example.html to www.domain.com/example Here
(dd/MM/yyyy HH)+ - + (x.Hour+1).ToString(); So here is example what I got and what
Here is an example of polymorphism from http://www.cplusplus.com/doc/tutorial/polymorphism.html (edited for readability): // abstract base

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.