.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> Sql Server >> Post New QuestionBookmark and Share Subscribe to Forum

how to get the records

Posted By: Santosh     Posted Date: October 20, 2010    Points:2   Category :Sql Server
Hi All,

i have some doubt on sql server 2005,

i have one table called table1(id,name,dob,address) and having other table called table2(id,name,dob,address,salary)

i want the records from table2 of the combination(name,dob,address) which is not exist in tables1

if table2 (name,dob,addres) combination is exist in table1 then that record should exclude...



Regards
Santosh



Responses
Author: Ramesh P             
Posted Date: October 20, 2010     Points: 5   

Use the following select query,

select name,dob,address from table2 except (select name,dob,address from table1)

Regards,


Ramesh

Author: Santosh             
Posted Date: October 22, 2010     Points: 5   

Thank u very much ramesh ,it's working........


Regards
Santosh

Author: Santosh             
Posted Date: October 27, 2010     Points: 5   

i also got one more method to resolve this problem...
just follow this link.......

http://www.dotnetspark.com/kb/Content.aspx?id=2864

Regards
Santosh

Author: Narayanan             
Posted Date: July 13, 2011     Points: 20   

Hi,
use Not In you select Statement

Regards, Lakshmi Naraayanan.S
http://dotnettechrocks.blogspot.in/


Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend