Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««12345»»»

ORDER BY Expand / Collapse
Author
Message
Posted Monday, March 31, 2008 1:41 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued 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.
Post #476814
Posted Monday, March 31, 2008 1:45 AM
Right there with Babe

Right there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with Babe

Group: General Forum Members
Last Login: Wednesday, February 20, 2013 2:42 AM
Points: 739, Visits: 75
I try with SQL 2005 and that works perfectly.
Post #476815
Posted Monday, March 31, 2008 1:48 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Monday, July 21, 2014 4:57 AM
Points: 1,049, Visits: 3,002
@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
Post #476816
Posted Monday, March 31, 2008 2:02 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

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.
Post #476819
Posted Monday, March 31, 2008 2:14 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Friday, May 2, 2014 7:45 AM
Points: 212, Visits: 31
Another way of doing this is

select start_date as [Date], *
from employee
order by [Date] desc



Post #476823
Posted Monday, March 31, 2008 2:24 AM


Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Thursday, October 4, 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
Post #476825
Posted Monday, March 31, 2008 3:00 AM
SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Monday, June 30, 2014 2:30 AM
Points: 1,614, Visits: 890
Since the answer you have is incorrect for SQL 2000, and you never specified which version, can we have our points back please?
Post #476835
Posted Monday, March 31, 2008 3:09 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Tuesday, January 8, 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).
Post #476838
Posted Monday, March 31, 2008 3:17 AM
Right there with Babe

Right there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with Babe

Group: General Forum Members
Last Login: Wednesday, February 20, 2013 2:42 AM
Points: 739, 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....
Post #476840
Posted Monday, March 31, 2008 3:22 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC 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
Post #476844
« Prev Topic | Next Topic »

Add to briefcase ««12345»»»

Permissions Expand / Collapse