ORDER BY

  • Hi,

    This perfectly works for SQL Server 2000 and 2005.

    Regards

    Ravi

  • Ravi

    oh dear!

    'perfectly' ...er try again please!

    your results do not fit any of the possible answers.:)

    please read the preceeding 10 pages to learn why:P

    --Shaun

    Hiding under a desk from SSIS Implemenation Work :crazy:

  • Well,

    All I can tell you is this. I do not have access to adjust the DB mode in either of the DB versions we have, but I ran the query as stated in both environments and received the first option in the SQL Server 2000 DB and the Ambiguous column name error in the SQL Server 2005 DB.

    You can talk about bad SQL and repeated data, and I agree. But cannot deny the results I came up with.

    Maybe adjusting the mode in 2005 gives different results, as others have suggested, but I cannot speak to that.

    Just telling you what I found....

    Ciao

    Gene

  • Gene none of the anwers mentions a repeated column name.

    Please I'm tired of this debate. 😉

    --Shaun (who I am not Sean)

    Hiding under a desk from SSIS Implemenation Work :crazy:

  • I agree with the posts above,

    Please state the environment and the situation some more.

    Greetings

    Niels Naglé

  • I strongly suggest the author mentioned Answer is wrong.

    It should display all the columns in descending order ,with the mentioned column as first.

    karthik

  • Guys

    We now have 12 pages of posts. I think I'm right in saying that an answer for EVERY POINT RAISED is given on EACH AND EVERY PAGE (with the probable exception of this last one). Therefore BEFORE you post a reply, REVIEW PREVIOUS POSTS. You don't even need to read the whole thread. Just pick one page at random.

    @the mods, is there any way we can justify locking this thread now? I think we've covered the important ground now....

    Semper in excretia, suus solum profundum variat

  • I can not win for losing !

    We need arbitation ....

  • Hi,

    I run this query in SQL Server 2000 successfully.so I think option 'A' is correct.

    Thanks........

    Sachin Kulshreshtha

  • sachin kumar:

    no it doesn't.

    Does the result you get match exactly any of the answers? No.

    It is a SQL2005 mode 90 question.

    Please read all of the previous 12 pages to understand your mistake. 😀

    --Shaun

    Hiding under a desk from SSIS Implemenation Work :crazy:

  • i was amazed to see i was wrong... when actually i wasn't...

  • thierry.vandurme (4/8/2008)


    i was amazed to see i was wrong... when actually i wasn't...

    Yes you were wrong dude! 😛

    Hiding under a desk from SSIS Implemenation Work :crazy:

  • I'm not sure what Shaun McGuile is on about. I've read all 12 pages, and he seems to keep going on about what SHOULD happen.

    When I answered the question, it said, "What is the result of running this command?". Nothing about the BOL, nothing about version, nothing about what was legitimate, nothing about sloppy M$ code, but something more pragmatic.

    The duplicated column with SQL2K5 compat 80? Well what about the row numbers? They appear too, but don't make it into any of the answers either! The fact that Start_Date appears in the first AND second column does not invalidate the rest of the output requirements as specified in first answer, and found in my prgamatic test.

    So I picked the closest - the first one. Yes, SQL2K mode is a bit old, but not excluded. If 'none of the above' was an option, then he MIGHT have a point (but only if all answer that fail to mention row numbers are excluded from all other QotDs like this), but no, that loophole isn't available for him.

    "Used as input to another TSQL"? No, that wasn't in the Q either.

    So ... I have evidence that the first answer is the correct one, but am denied my point. How sad.

    ----------

    Brewmanz: "Does your table have a column called 'start_date'?"

    Shaun: "No, it has columns called 'start_date' and 'name'?"

    ----------

  • My issue is with people making claims of righteousness without understanding. 🙂

    "Strive to understand, before striving to be understood" 😉

    People seem to be stating that they are right without the understanding as to why their answer was wrong, and are not prepared to accept the Question Poster's explanation, and in doing so refuse to learn. 😛

    Its like a religion to some people 🙂

    Hell anybody who posts here gets/recovers a point anyway :hehe:

    --Shaun

    Hiding under a desk from SSIS Implemenation Work :crazy:

  • basically it seems to be you (shaun) against the world... how sad and lonely you must feel 😉

    thx for the point though!

Viewing 15 posts - 106 through 120 (of 182 total)

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