Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««123»»

INTERSECT 2 Expand / Collapse
Author
Message
Posted Tuesday, June 19, 2012 5:07 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 9:55 AM
Points: 12,208, Visits: 9,175
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?

Member of LinkedIn. My blog at LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1317894
Posted Tuesday, June 19, 2012 5:31 AM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Today @ 8:44 AM
Points: 1,629, Visits: 2,038
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
Post #1317907
Posted Tuesday, June 19, 2012 6:08 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Tuesday, April 15, 2014 6:27 AM
Points: 1,378, Visits: 454
it really helped that #2 and #3 are exactly the same, then i knew about the distinct so by process of elimination.... 1 pt.
Post #1317936
Posted Tuesday, June 19, 2012 6:09 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Tuesday, April 15, 2014 6:27 AM
Points: 1,378, Visits: 454
no riots?
Post #1317939
Posted Tuesday, June 19, 2012 6:21 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Tuesday, April 15, 2014 6:27 AM
Points: 1,378, Visits: 454
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?
Post #1317946
Posted Tuesday, June 19, 2012 6:25 AM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Today @ 8:44 AM
Points: 1,629, Visits: 2,038
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
Post #1317950
Posted Tuesday, June 19, 2012 6:33 AM
SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Thursday, July 25, 2013 7:37 AM
Points: 1,617, Visits: 355
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
Post #1317955
Posted Tuesday, June 19, 2012 7:37 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 9:29 AM
Points: 11,994, Visits: 11,012
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.


_______________________________________________________________

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 Moden's 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)
Post #1318014
Posted Tuesday, June 19, 2012 7:53 AM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Today @ 8:44 AM
Points: 1,629, Visits: 2,038
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.


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
Post #1318034
Posted Tuesday, June 19, 2012 7:55 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 9:29 AM
Points: 11,994, Visits: 11,012
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.


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 Moden's 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)
Post #1318036
« Prev Topic | Next Topic »

Add to briefcase ««123»»

Permissions Expand / Collapse