SQL NOT EXist In Another Table - Query

Posted on 2012-09-18
Last Modified: 2012-09-18
SELECT * from vw_340B Vw  - This returns 68 Rows
select * from CP_340B - This Returns 45 Rows

I have to find the difference by  FirstName

SELECT * from vw_340B Vw
     WHERE Vw.nameFirst NOT EXISTS IN (select [First Name] as nameFirst from CP_340B)

Any syntax help , please !!
Question by:chokka
    LVL 9

    Accepted Solution

    SELECT * from vw_340B Vw
         WHERE Vw.nameFirst NOT IN (select [First Name] as nameFirst from CP_340B)

    Author Closing Comment


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Maximize Your Threat Intelligence Reporting

    Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

    Let's review the features of new SQL Server 2012 (Denali CTP3). It listed as below: PERCENT_RANK(): PERCENT_RANK() function will returns the percentage value of rank of the values among its group. PERCENT_RANK() function value always in be…
    This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
    Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
    Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now