SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


INTERSECT 2


INTERSECT 2

Author
Message
Koen Verbeeck
Koen Verbeeck
One Orange Chip
One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)

Group: General Forum Members
Points: 27115 Visits: 13268
Mighty (6/19/2012)
I might overlook something, but aren't option 2 and 3 the same?


Nope, they are the same. The idea was probably that one of the two didn't have the DISTINCT clause.


How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?
My blog at SQLKover.

MCSE Business Intelligence - Microsoft Data Platform MVP
Thomas Abraham
Thomas Abraham
SSCrazy
SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)

Group: General Forum Members
Points: 2703 Visits: 2255
Appreciate the question. Had to think for a minute, as I almost never use OUTER joins.

A totally unrelated aside: Back from vacation. Missed the QotD. Didn't miss work.

Spent 17 days in Greece. PLEASE consider a vacation there this year. The place is almost devoid of tourists, and for no good reason. In spite of their troubles, the Greeks were as gracious, warm, and hospitable as ever.

End of totally unrelated comment.

Please don't go. The drones need you. They look up to you.
Connect to me on LinkedIn
Mike Is Here
Mike Is Here
SSCommitted
SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)

Group: General Forum Members
Points: 1532 Visits: 513
it really helped that #2 and #3 are exactly the same, then i knew about the distinct so by process of elimination.... 1 pt.
Mike Is Here
Mike Is Here
SSCommitted
SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)

Group: General Forum Members
Points: 1532 Visits: 513
no riots?
Mike Is Here
Mike Is Here
SSCommitted
SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)

Group: General Forum Members
Points: 1532 Visits: 513
Thomas Abraham (6/19/2012)
Appreciate the question. Had to think for a minute, as I almost never use OUTER joins.

A totally unrelated aside: Back from vacation. Missed the QotD. Didn't miss work.

Spent 17 days in Greece. PLEASE consider a vacation there this year. The place is almost devoid of tourists, and for no good reason. In spite of their troubles, the Greeks were as gracious, warm, and hospitable as ever.

End of totally unrelated comment.


no riots?
Thomas Abraham
Thomas Abraham
SSCrazy
SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)

Group: General Forum Members
Points: 2703 Visits: 2255
mbova407 (6/19/2012)
no riots?


The five days we were in Athens, right up to the 15th, there was nada. We did see a gathering of about 500 people for a speech. The media has sensationalized the situation and given an overdramatic picture of what is going on.

The result: we went to a beach, about 10 km long, on the western coast of the Peloponnese, and there were 6 people on the beach at noon!

Please don't go. The drones need you. They look up to you.
Connect to me on LinkedIn
Ernie Schlangen
Ernie Schlangen
SSCommitted
SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)

Group: General Forum Members
Points: 1836 Visits: 462
mbova407 (6/19/2012)
it really helped that #2 and #3 are exactly the same, then i knew about the distinct so by process of elimination.... 1 pt.


+1 :-D
Sean Lange
Sean Lange
One Orange Chip
One Orange Chip (25K reputation)One Orange Chip (25K reputation)One Orange Chip (25K reputation)One Orange Chip (25K reputation)One Orange Chip (25K reputation)One Orange Chip (25K reputation)One Orange Chip (25K reputation)One Orange Chip (25K reputation)

Group: General Forum Members
Points: 25835 Visits: 17509
Thomas Abraham (6/19/2012)
Appreciate the question. Had to think for a minute, as I almost never use OUTER joins.



I suspect you actually use outer joins far more frequently than you think.

A left join is the same thing as a left outer join. The outer keyword is optional. :-P

_______________________________________________________________

Need help? Help us help you.

Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

Need to split a string? Try Jeff Modens splitter.

Cross Tabs and Pivots, Part 1 – Converting Rows to Columns
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs
Understanding and Using APPLY (Part 1)
Understanding and Using APPLY (Part 2)
Thomas Abraham
Thomas Abraham
SSCrazy
SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)

Group: General Forum Members
Points: 2703 Visits: 2255
Sean Lange (6/19/2012)
Thomas Abraham (6/19/2012)
Appreciate the question. Had to think for a minute, as I almost never use OUTER joins.



I suspect you actually use outer joins far more frequently than you think.

A left join is the same thing as a left outer join. The outer keyword is optional. :-P


Of course you are correct. My mind must still be on that beach. Thanks for correcting me.

Please don't go. The drones need you. They look up to you.
Connect to me on LinkedIn
Sean Lange
Sean Lange
One Orange Chip
One Orange Chip (25K reputation)One Orange Chip (25K reputation)One Orange Chip (25K reputation)One Orange Chip (25K reputation)One Orange Chip (25K reputation)One Orange Chip (25K reputation)One Orange Chip (25K reputation)One Orange Chip (25K reputation)

Group: General Forum Members
Points: 25835 Visits: 17509
Thomas Abraham (6/19/2012)
Sean Lange (6/19/2012)
Thomas Abraham (6/19/2012)
Appreciate the question. Had to think for a minute, as I almost never use OUTER joins.



I suspect you actually use outer joins far more frequently than you think.

A left join is the same thing as a left outer join. The outer keyword is optional. :-P


Of course you are correct. My mind must still be on that beach. Thanks for correcting me.


I wish my mind was still on the beach...so jealous. Sounds you had a great time.

_______________________________________________________________

Need help? Help us help you.

Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

Need to split a string? Try Jeff Modens splitter.

Cross Tabs and Pivots, Part 1 – Converting Rows to Columns
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs
Understanding and Using APPLY (Part 1)
Understanding and Using APPLY (Part 2)
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search