Solved

TSQL Not In Type

Posted on 2014-04-26
3
285 Views
Last Modified: 2014-04-30
Hello All,

There are two tables having several columns. Now there are three column - account,product,month in both of the tables tblA and tblB.

I want to find out all the rows for the combination of account,product and month which is in tblA BUT not in tblB

Any ideas?
0
Comment
Question by:Rayne
  • 2
3 Comments
 
LVL 8

Accepted Solution

by:
ProjectChampion earned 500 total points
ID: 40025210
Try this:
Select A.*
From tblA A Left Outer Join tblB B
On A.Account = B.Account And A.Product = B.Product And A.Month = B.Month
WHERE B.Account Is Null;
0
 

Author Comment

by:Rayne
ID: 40025243
Thank you Dara
0
 

Author Comment

by:Rayne
ID: 40033932
Thank you sire, your help saved me big time :)
Thank you
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Office Picture Manager is not included in Office 2013. This comes as a shock to users upgrading from earlier versions of Office, such as 2007 and 2010, where Picture Manager was included as a standard application. This article explains how…
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
Learn how to make your own table of contents in Microsoft Word using paragraph styles and the automatic table of contents tool. We'll be using the paragraph styles in Word’s Home toolbar to help you create a table of contents. Type out your initial …
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

776 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