T SQL

  • None of the above :-D?

  • my answer too

    Vyas Mohan

    Mohan Shobha

    Shridhar Mohan

    Sourabh Mohan

    :-D:-D:-D

  • I think the issue here is the typo in the answers. That fooled me, so after getting it wrong I ran the code and got the same result set as everyone else.

    A good question, but you really need to edit the result sets to get rid of the type.:-)

  • Can somebody take this link down or at least fix the answer? It is really annoying that a question is posted with no correct answer on something that is e-mailed for everybody to try. I understand mistakes happen, but they should at least be fixed when caught.

  • Should row numbers be specified in the answer if no ORDER BY clause is given? It's my understanding that a SELECT statement without an ORDER BY clause, returns the set, but with no guaranteed order. Fortunately, in the answer options for this question, there was only one that had all the right pairs.

  • R. Brush (5/27/2009)


    Should row numbers be specified in the answer if no ORDER BY clause is given? It's my understanding that a SELECT statement without an ORDER BY clause, returns the set, but with no guaranteed order. Fortunately, in the answer options for this question, there was only one that had all the right pairs.

    That has been discussed before and apparently ignored or overlooked.



    Alvin Ramard
    Memphis PASS Chapter[/url]

    All my SSC forum answers come with a money back guarantee. If you didn't like the answer then I'll gladly refund what you paid for it.

    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]

  • The question has been corrected to fix the typo and include an ORDER by clause.

    main.denis, sorry we are not responding fast enough for you. It is the morning here, this question has been out for a few hours, and unfortunately, it is not our top priority.

  • Steve Jones - Editor (5/27/2009)


    The question has been corrected to fix the typo and include an ORDER by clause.

    main.denis, sorry we are not responding fast enough for you. It is the morning here, this question has been out for a few hours, and unfortunately, it is not our top priority.

    Yes, but I took the question as in the e-mail and hence answered option 3, which seemed correct. Now with the order by clause, of course there is a change.... What gives.

    _______________________________________________________________________
    For better assistance in answering your questions, click here[/url]

  • WOW,:w00t: I got a point back. Thanks Steve 😀

    I appreciate it's your morning there and there may be more pressing concerns than a point for a QOD answer.

  • rkavula (5/27/2009)


    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

    I got this one wrong too... I ran the query out of the email...

    except the query posted is a bit different

    CREATE TABLE E (eid int, mid int, en char(10) )

    INSERT E SELECT 1,2,'Vyas'

    INSERT E SELECT 2,3,'Mohan'

    INSERT E SELECT 3,NULL,'Shobha'

    INSERT E SELECT 4,2,'Shridhar'

    INSERT E SELECT 5,2,'Sourabh'

    SELECT t1.en [Em], t2.en [Ma] FROM E t1, E t2 WHERE t1.mid = t2.eid

    order by t1.en

    the order by changes it.



    --Mark Tassin
    MCITP - SQL Server DBA
    Proud member of the Anti-RBAR alliance.
    For help with Performance click this link[/url]
    For tips on how to post your problems[/url]

  • The question is repeated when you click in the newsletter. If there is an issue, we will try to fix it as soon as we can.

    The ORDER BY doesn't change what might occur, it just enforces a particular order.

  • In eMail no ORDER BY Clause, so people may be getting it wrong - Also really stupid to use such typo freindly names: just use A, B, C if you can't bring yourself to use Jim , Tim, Pat, etc.

  • I don't look at these challenges much. Today's item doesn't encourage me to do so in the future.

  • And the Particular Order is what makes this question non-trivial, the correct set in the wrong order is a wrong anwser.

  • CZakraysek (5/27/2009)


    Also really stupid to use such typo freindly names: just use A, B, C if you can't bring yourself to use Jim , Tim, Pat, etc.

    I suspect they're only typo-friendly (sic) to Europeans and Americans. Jim and Tim may be more typo-inducing for Indian forum members. This is a worldwide group.

    --
    Scott

Viewing 15 posts - 31 through 45 (of 73 total)

You must be logged in to reply to this topic. Login to reply