SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Old Forums
 CLOSED - General SQL Server
 select records from a table that isnt in other
 Forum Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

shifis
Posting Yak Master

Mexico
157 Posts

Posted - 07/06/2006 :  12:53:47  Show Profile  Send shifis a Yahoo! Message
Hi, i got brain freeze and dont know how to solve my problem.

I got 2 tables with the same type of data, what i need is select the records that are in the first table but arent in the second.

Any idea will be helpful.

X002548
Not Just a Number

15586 Posts

Posted - 07/06/2006 :  13:02:07  Show Profile
SELECT * FROM table1 a WHERE NOT EXISTS (SELECT * FROM table2 b WHERE a.key = b.key)



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam
Go to Top of Page
  Previous Topic Topic Next Topic  
 Forum Locked
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.03 seconds. Powered By: Snitz Forums 2000