May 27, 2009 at 2:20 am
Leo Hesen (5/27/2009)
Made the obvious mistake myself.My assumption:
1 Not correct
2 Not correct
So it had to be 3 without examining this answer properly.
Reminded me to not jump to conclusions to early!
Always check everything.
Leo
Me too, I must read all the questions completely before jumping to conclusions - doh!
May 27, 2009 at 2:43 am
Leo Hesen (5/27/2009)
Made the obvious mistake myself.My assumption:
1 Not correct
2 Not correct
So it had to be 3 without examining this answer properly.
Reminded me to not jump to conclusions to early!
Always check everything.
Leo
I did exactly the same as you. It's always reassuring to see other people making the same mistakes as myself - makes me feel a bit less stupid.txtPost_CommentEmoticon(':-)');
--
Scott
May 27, 2009 at 5:40 am
So I'm not the only one thinking the options given are wrong!
May 27, 2009 at 5:45 am
Amazing, I ran the code which supposedly has a typo, and the results were:
Em Ma
---------- ----------
Vyas Mohan
Mohan Shobha
Shridhar Mohan
Sourabh Mohan
(4 row(s) affected)
I must have read too fast.
Was the question tested and verified before it was posted?
Steve Jimmo
Sr DBA
“If we ever forget that we are One Nation Under God, then we will be a Nation gone under." - Ronald Reagan
May 27, 2009 at 5:49 am
Like everyone else seems to have, i discarded the first answer because there was NOT a second name in the third row. Yes I understand it's a typo but as it stands there is not a correct answer to choose from. I would have an issue with a developer that made the assumption that was what the end user meant instead of verifying it. (I know that would never happen in production. Right? :-P)
May 27, 2009 at 5:51 am
Hi , the answer for this quesiton is below
SELECT t1.en [Em], t2.en [Ma] FROM E t1, E t2 WHERE t1.mid = t2.eid
Em Ma
Vyas Mohan
Mohan Shobha
Shridhar Mohan
Sourabh Mohan
select t1.en [Em], t2.en [Ma]
FROM E t1
Inner join
E t2
on
t1.mid = t2.eid
-- same out put
May 27, 2009 at 5:56 am
no correct answers to choose from ::::
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
May 27, 2009 at 6:02 am
Answer given is wrong. I am getting this -
Vyas Mohan
Mohan Shobha
Shridhar Mohan
Sourabh Mohan
May 27, 2009 at 6:11 am
I think the idea of questions like these is to try and answer them WITHOUT running the code i.e. to check your understanding of what the code will do 😉 However, in a case where there is an obvious typo I don't think you have much option!
May 27, 2009 at 7:03 am
I marked the correct answer but was counted as incorrect. The answer given by the explanation is wrong. The execution results are:
Vyas Mohan
Mohan Shobha
Shridhar Mohan
Sourabh Mohan
May 27, 2009 at 7:15 am
Add my name to the list of complainers.
For best practices on asking questions, please read the following article: Forum Etiquette: How to post data/code on a forum to get the best help[/url]
May 27, 2009 at 7:38 am
Add my name to the list of complainers.
Me too. I ran this in my head and came up with what I thought would be correct. but since that answer was not on the list I had to guess. The answers were so hard to read that the addition of a typo just pushed it over the edge. Interesting question, horrible execution.
_______________________________________________________________
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 http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
May 27, 2009 at 7:41 am
What a lot of complainers!
If everybody who had posted came up with a question of their own I bet we'd have some really good questions. And they'd all be perfect of course!
🙂
May 27, 2009 at 7:45 am
Just in case... don't forget to cleanup after you executed the query. This is not a temporary table.
May 27, 2009 at 7:49 am
I concur. The result set is (should be):
Vyas Mohan
Mohan Shobha
Shridhar Mohan
Sourabh Mohan
Cheers,
Brian
Viewing 15 posts - 16 through 30 (of 73 total)
You must be logged in to reply to this topic. Login to reply