|
|
|
SSC-Dedicated
           
Group: Administrators
Last Login: Yesterday @ 3:19 PM
Points: 31,526,
Visits: 13,863
|
|
When someone said they ran the SQL, I said with the corrected question they couldn't get those results.
The newsletter is what the question goes out as, but it could potentially be changed if we find issues. I'm not sure what you want. Do you want us to correct questions or not? It we correct them, the newsletter will be different.
Follow me on Twitter: @way0utwest
 Forum Etiquette: How to post data/code on a forum to get the best help
|
|
|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Thursday, June 06, 2013 7:11 PM
Points: 16,
Visits: 65
|
|
Please supply the right list of options when you post a question. the correct answer is Em Ma Vyas Mohan Mohan Shobha Shridhar Mohan Sourabh Mohan
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Friday, May 24, 2013 9:02 AM
Points: 1,196,
Visits: 1,320
|
|
Mark Pratt (5/27/2009) I don't look at these challenges much. Today's item doesn't encourage me to do so in the future.
I used to be the same, but now I try to figure out what the questioner is trying to test. I've learned a lot from these questions. I can be 'morally' right and still lose the point - I've still figured something out.
|
|
|
|
|
SSC Veteran
      
Group: General Forum Members
Last Login: Thursday, December 20, 2012 1:03 PM
Points: 265,
Visits: 589
|
|
cj_logan (5/27/2009)
Question
Why is the inner join the recommended option ? I know Microsoft recommends this way but no where can I find a reason ? According to the execution plan both are the same and both cost 50%
SELECT t1.en [Em], t2.en [Ma] FROM E t1, E t2 WHERE t1.mid = t2.eid order by t1.en
SELECT t1.en [Em], t2.en [Ma] FROM E t1 inner join E t2 on t1.mid = t2.eid order by t1.en
Joins in ANSI syntax can be made explicit without mangling the where logic. Parsers and optimizations have less ambiguity to deal with under certain conditions. The old syntax of using *= for left and right joins can now be done away. Cross joins also become explicit. For programming, the cleaner and more explicit ANSI syntax could lead to faster debugging. It took me a while to transition, but now that I did, I like it.
|
|
|
|
|
Hall of Fame
       
Group: General Forum Members
Last Login: Today @ 3:41 AM
Points: 3,250,
Visits: 65,538
|
|
sjsubscribe (5/27/2009)
Joins in ANSI syntax can be made explicit without mangling the where logic. Parsers and optimizations have less ambiguity to deal with under certain conditions. The old syntax of using *= for left and right joins can now be done away. Cross joins also become explicit. For programming, the cleaner and more explicit ANSI syntax could lead to faster debugging. It took me a while to transition, but now that I did, I like it.
I feel lucky... when I got involved with SQL Server, DBs, and DB Theory ANSI style joins were available. I actually had queries back on SQL 7 that performed better when I specified ANSI joins than when I used that kack nasty syntax (for whatever reason, but I was seeing actual differences in performance back then).
I remember looking at a 12 table join in the older where clause syntax and spending quite a bit of time trying to figure out how all the joins worked. The first thing I did after I figured it out was to convert the query to ANSI syntax.
For a few years I was teaching Intro to DB Theory at a local community college. I explained the Where clause Join and told my students if they ever turned in work using it that I'd take off points for bad style.
--Mark Tassin MCITP - SQL Server DBA Proud member of the Anti-RBAR alliance. For help with Performance click this link For tips on how to post your problems
|
|
|
|
|
SSC Veteran
      
Group: General Forum Members
Last Login: 2 days ago @ 8:44 AM
Points: 220,
Visits: 357
|
|
Steve Jones - Editor (5/27/2009) The newsletter is what the question goes out as, but it could potentially be changed if we find issues. I'm not sure what you want. Do you want us to correct questions or not? It we correct them, the newsletter will be different. How about a friendly suggestion to indicate on the web page that the question is different from what was mailed out? Maybe right above the list of answer choices? I like the QOTD's. They've helped me learn more about MSSQL.
|
|
|
|
|
SSCommitted
      
Group: General Forum Members
Last Login: Today @ 3:11 AM
Points: 1,774,
Visits: 1,320
|
|
I too have seleted option 3 hence wrong.... BAD LUCK!!
I do agree with STEVE JONES; we need to be positive why people are more worried about points more than that wright or wrong? I liked positive approach of "ppcx" by giving suggestion.
All are human beings and made mistakes... We are not COMPUTERS!
We need to encourage people to post more and wright about SQL.
SUCCESS COMES OUT OF FAILURE ONLY.
--------------------------------------------------- "Thare are only 10 types of people in the world: Those who understand binary, and those who don't."
|
|
|
|
|
SSC Rookie
      
Group: General Forum Members
Last Login: Friday, January 11, 2013 3:33 AM
Points: 29,
Visits: 26
|
|
Hi Guys
This answer is correct when there is no order by clause in the question.
row1 - Vyas Mohan row2 - Mohan Shobha row3 - Shridhar Mohan row4 - Sourabh Mohan
else
this is correct. Row 1 - Mohan Shobha | Row 2 - Shridhar Mohan | Row 3 - Sourabh Mohan | Row 4 - Vyas Mohan
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Wednesday, July 18, 2012 11:09 PM
Points: 9,
Visits: 9
|
|
first Row- Mohan Shobha Second Row-Shridhar Mohan third Row- Sourabh Mohan Fourth Row- Vyas Mohan
|
|
|
|
|
Hall of Fame
       
Group: General Forum Members
Last Login: Friday, March 15, 2013 2:43 PM
Points: 3,924,
Visits: 1,554
|
|
Barry McConnell (5/27/2009)
SanjayAttray (5/27/2009) WOW.........never seen so many complaints for a single question on QOD before. Good job Reddy. You made all forum posters stand united.You must not have seen the MDX Except question then! 
Yep Barry. Look like I missed that fun before.
SQL DBA.
|
|
|
|