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
 Comparison
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

immad
Posting Yak Master

Pakistan
222 Posts

Posted - 09/13/2013 :  02:52:47  Show Profile  Reply with Quote
hello,

how i can make a comparison of data.


sqlid----foxid
1--------4
2--------3
3--------2

i want this type of data

sqlid----foxid-----id
1--------4--------2
2--------3--------3
3--------2--------

please help me out


immad uddin ahmed

bandi
Flowing Fount of Yak Knowledge

India
2224 Posts

Posted - 09/13/2013 :  03:04:43  Show Profile  Reply with Quote
What is the logic here? Can you explain the logic for the above output?

--
Chandu
Go to Top of Page

immad
Posting Yak Master

Pakistan
222 Posts

Posted - 09/13/2013 :  04:00:30  Show Profile  Reply with Quote
if sqlid columns value and foxid columns value match then its shows in id column

immad uddin ahmed
Go to Top of Page

divya.ce
Starting Member

India
16 Posts

Posted - 09/13/2013 :  06:30:49  Show Profile  Reply with Quote
What value is to be shown in ID column? please give complete In and out description, In the output which you have shown, sqlid and foxid do not match, then also you are showing id column value.
Go to Top of Page

VeeranjaneyuluAnnapureddy
Posting Yak Master

India
169 Posts

Posted - 09/13/2013 :  06:49:53  Show Profile  Reply with Quote
SELECT DISTINCT T.SqlId FROM Temp AS T
inner join Temp TT
ON T.SqlId = TT.FoxId
ORDER BY t.SqlId

veeranjaneyulu
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.08 seconds. Powered By: Snitz Forums 2000