ORDER BY

  • dude you crack me up!

    SQL2000/SQL2005(Mode 80) DBA - 'Hey my results don't fit any of the available answers, the question is wrong!':unsure:

    'I want the points!':angry:

    Final thought from me (oh yeah like that would happen).

    How many people does that sound like?

    Your results do not fit any of the answers then you must be doing something not right.:Whistling:

    --Shaun

    Hiding under a desk from SSIS Implemenation Work :crazy:

  • I had college professors who would write questions like this that basically required you to read their minds to have a chance at getting it right. Certainly this should be looked at as a learning experience and a chance to broaden our knowledge. But that could also happen with a properly written question. Questions like this don't truly test your knowledge because there is more than one "best correct" answer based on what angle you approach it from.

    To those who write questions, remove the ambiguity and truly test knowledge with well-written questions. If you really need to be sneaky, underhanded and confusing get a job with the IRS.

  • dont stick on your points only

    you must listen other points also

    many cases you are right, like you others points also right

    i want remind you that it is the discusson not the decision

    i am very tired to see my inbox today

    cheers

    shamsudheen

  • So Mr Harder, you last tax return..

    we have some questions for you....

    Just kidding!

    (we'll see you later)

    --Shaun

    Hiding under a desk from SSIS Implemenation Work :crazy:

  • So, you're one of them sneaky ones...:w00t:

  • Can I change my answer to

    E: You should have recognized this as the April Fools Day question, one day early.

    Seriously, as someone still learning about SQL server, and someone tasked with supporting a mixed environment of 200+ SQL installations with all the different flavors of SQL 2000 and 2005, this question really reinforces the point of testing, testing, testing, testing, and more testing. Then maybe a little more testing.

  • It also reinforces the never select * from anything rule!

  • I have no opinion on the matter at hand. I just think I need a nap after reading this entire thread....:)

    ----------------------------------------------------------------------------------
    Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?

  • Definately agree with you Matt, I need a nap now too.

    😎

  • Well,

    In my case the query worked perfectly fine, both in SQL 2000 and 2005, also, the headings reflected the name correctly.

    So I don't know,

    Does that mean something is wrong with my SQL since it DID WORK.

  • Check the database compatibility level in the 2005 database you queried. If it is set to 80 then that would be the reason it worked.

  • In SQL Server 2005 it works too.....

    Answer to the question is wrong in this case.

    Thanks

  • In SQLServer 2000 and SQLServer 2005 it will work. I tested in both the versions. Its working fine.

    I am not understaning in what way it is wrong.

  • I also answered via SQL Server 2000 DB, though using the SQL Server 2005 Management Studio. Its not specific here. When I tried it 2000 and it worked. Our newer DB is 2005. Tried it there and it failed with the answer given in the question (Ambiguous column name). Should get some credit for the lack of DB specificity.

  • For the last time, yeah right!:)

    SQL2000/SQL2005(Mode 80) do not 'fail/give an error response', but give a result which matches none of the answers to the question.

    Therefore they are not applicable. => (a) is not the correct answer!

    SQL is not 'correctly' implemented in SQL2000/SQL2005(Mode 80)

    ORDER BY should only be used with uniquely named columns

    The SELECT ColX, * from tableZ

    when ColX is a reference to tableZ.ColX should not give a result set as you will have two columns with the same name - BAD BAD BAD = repeated data and repeated Metadata.:crazy:

    Here endeth the lesson young DBAs, mark these words well.:D

    --Shaun

    Hiding under a desk from SSIS Implemenation Work :crazy:

Viewing 15 posts - 91 through 105 (of 182 total)

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