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
 General SQL Server Forums
 New to SQL Server Programming
 Fetche mis matched Records from two tables
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

silvestersymon
Starting Member

India
2 Posts

Posted - 11/08/2013 :  02:05:46  Show Profile  Reply with Quote
Hi All,

Hi have 'Privious' table as

***Metrics Count***
AccessibilityFilter 1679
Archives 80
Corel 90
DateFilter 1680

and 'Current' table as

***Metrics Count***
AccessibilityFilter 1679
Archives 85
Corel 100
DateFilter 1680


I want to fetch only the mis matched records as below.

***Metrics PreviousCount CurrentCount***
Archives 80 85
Corel 90 100

Thanks In Advance...

Regards,
Simon.L

visakh16
Very Important crosS Applying yaK Herder

India
52309 Posts

Posted - 11/08/2013 :  04:00:19  Show Profile  Reply with Quote

SELECT c.TextField,c.NumberField,p.NumberField 
FROM Current c
INNER JOIN Previous p
ON p.TextField = c.TextField
WHERE p.NumberField <> c.NumberField 


------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page

silvestersymon
Starting Member

India
2 Posts

Posted - 11/11/2013 :  04:16:24  Show Profile  Reply with Quote
Hi Visakh

Its working really fine thank you.

Regards,
Simon.L
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
52309 Posts

Posted - 11/11/2013 :  04:33:45  Show Profile  Reply with Quote
you're welcome

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.19 seconds. Powered By: Snitz Forums 2000