|
|
|
Valued Member
      
Group: General Forum Members
Last Login: Monday, April 16, 2012 1:17 AM
Points: 69,
Visits: 42
|
|
Hi,
The question is not version specific. Please make sure to mention the version on the future questions.
|
|
|
|
|
Right there with Babe
      
Group: General Forum Members
Last Login: Wednesday, February 20, 2013 2:42 AM
Points: 730,
Visits: 75
|
|
| I try with SQL 2005 and that works perfectly.
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Yesterday @ 9:39 AM
Points: 1,043,
Visits: 2,944
|
|
@Kenny, is the database you tried your query against set at compatibility level 8.0? If so, you're right that it'll work fine. However, changing the compatibility level to 9.0 (obviously not on a db of any kind of importance if you're changing just to answer a QOTD ;)), it'll give the error stated as being the correct answer.
Semper in excretia, sumus solum profundum variat
|
|
|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Friday, June 18, 2010 10:17 AM
Points: 14,
Visits: 12
|
|
Hi, The suggessted answer is wrong, For SQL server 2000 the query runs successfully without any error and the option A is correct.
|
|
|
|
|
SSC Veteran
      
Group: General Forum Members
Last Login: Monday, December 03, 2012 3:48 AM
Points: 210,
Visits: 28
|
|
Another way of doing this is
select start_date as [Date], * from employee order by [Date] desc
|
|
|
|
|
Mr or Mrs. 500
      
Group: General Forum Members
Last Login: Thursday, October 04, 2012 9:20 AM
Points: 583,
Visits: 1,060
|
|
Obviously a version specific question, without specifying the version doh!
Let's shoot/maim/harrass (delete as appropriate to your annoyance level) the question poster. :D
This is an IT forum - precision is everything - ambiguity leads to annoyed members.
--Shaun
Hiding under a desk from SSIS Implemenation Work
|
|
|
|
|
SSCommitted
      
Group: General Forum Members
Last Login: Wednesday, May 22, 2013 9:27 AM
Points: 1,538,
Visits: 802
|
|
| Since the answer you have is incorrect for SQL 2000, and you never specified which version, can we have our points back please?
|
|
|
|
|
SSC Veteran
      
Group: General Forum Members
Last Login: Tuesday, January 08, 2013 11:12 PM
Points: 284,
Visits: 129
|
|
| I tried the query on SQL SERVER 2005 and it ran fine with giving result as specified in choice (a).
|
|
|
|
|
Right there with Babe
      
Group: General Forum Members
Last Login: Wednesday, February 20, 2013 2:42 AM
Points: 730,
Visits: 75
|
|
Hi,
The current compatibility level is 90. Msg 209, Level 16, State 1, Line 1 Ambiguous column name 'PlanEnt'.
This is my check....
|
|
|
|
|
SSC Rookie
      
Group: General Forum Members
Last Login: Saturday, November 24, 2012 3:59 AM
Points: 35,
Visits: 23
|
|
If it is SQL 2000 then Correct ans is :- All columns and all rows from the employee table in descending start_date order, with the start_date as the first column
|
|
|
|