Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQL Server 2008
»
SQL Server 2008 - General
»
Distributed Query
Distributed Query
Rate Topic
Display Mode
Topic Options
Author
Message
Minnu
Minnu
Posted Thursday, March 21, 2013 4:08 AM
SSC-Enthusiastic
Group: General Forum Members
Last Login: Yesterday @ 8:34 AM
Points: 138,
Visits: 411
Hi Team,
i have two tables, i want a query to retrieve records available in (Instance 1) Table : A and missing in (Instance 2) Table :B.
Table_1:
ID | CHARACTER
1 A
2 B
3 C
4 D
5 E
Tabe_2 :
ID | CHARACTER
1 B
2 D
3 C
Output should be :
1 A
2 B
4 D
5 E
select * from Table_1 T1
LEFT join [SHH05\SVR1].Students.dbo.Stud_info T2
ON T1.ID=T2.ID
but am not getting the exact result, can u please help me...
Post #1433689
Stuart Davies
Stuart Davies
Posted Thursday, March 21, 2013 4:17 AM
SSCrazy
Group: General Forum Members
Last Login: Today @ 8:53 AM
Points: 2,499,
Visits: 2,200
See
http://www.sqlservercentral.com/Forums/Topic1433051-391-1.aspx#bm1433101
for suggestions
-------------------------------
Posting Data Etiquette - Jeff Moden
Smart way to ask a question
There are naive questions, tedious questions, ill-phrased questions, questions put after inadequate self-criticism. But every question is a cry to understand (the world). There is no such thing as a dumb question. ― Carl Sagan
I would never join a club that would allow me as a member - Groucho Marx
Post #1433699
Bhuvnesh
Bhuvnesh
Posted Thursday, March 21, 2013 5:19 AM
SSCrazy
Group: General Forum Members
Last Login: Thursday, June 13, 2013 7:03 AM
Points: 2,562,
Visits: 3,453
Minnu (3/21/2013)
Table_1:
ID | CHARACTER
1 A
2 B
3 C
4 D
5 E
Tabe_2 :
ID | CHARACTER
1 B
2 D
3 C
Output should be :
1 A
2 B
4 D
5 E
On what basis you are avoiding "C" OR how results comes here . what to include and what to exclude in results . Please clarify.
-------Bhuvnesh----------
While 1 = 1 (Learning SQL....)
Click to get fast response of your post
Post #1433726
« Prev Topic
|
Next Topic »
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.