locked
Comparing 2 columns in SQL RRS feed

  • Question

  • I have two columns in two different DBOs, I want to return those rows where a value exists in table 2 but not in table one.

    SELECT     dbo.RawPart2.FormID, dbo.RawPart1.FormID AS Expr1
    FROM         dbo.RawPart2 CROSS JOIN
                          dbo.RawPart1
    WHERE     <Missing Code>
    ORDER BY dbo.RawPart2.FormID

    What I want the query to return is those rows where a value that exists in dbo.RawPart2.FormID but does not exist in dbo.RawPart1.FormID (Expr1).

    Any ideas?
    • Moved by Tony Petrossian Wednesday, September 3, 2008 12:44 AM off topic (Moved from SQL Server Data Services (SSDS) - Getting Started to Off-Topic Posts (Do Not Post Here))
    Friday, July 25, 2008 6:52 PM

Answers