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 Saturday, March 29, 2008 4:08 PM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Today @ 3:02 AM
Points: 2,684, Visits: 2,440
Comments posted to this topic are about the item ORDER BY
Post #476622
Posted Saturday, March 29, 2008 10:39 PM
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: Wednesday, May 28, 2014 10:45 PM
Points: 529, Visits: 46
Hi,
I think question and answer aren't synchronous.

If it is question for SQL 2005 Server then good answer is:
"Msg 208, Level 16, State 1, Line 1
Invalid object name 'Employee'."

If your default Schema is not Schema to which employee table belongs.

If it is question for SQL 2000 Server (what syntax suggest :)) then good answer is:
"All columns and all rows from the employee table in descending start_date order, with the start_date as the first column"
Post #476669
Posted Sunday, March 30, 2008 1:40 AM
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Monday, August 25, 2008 9:56 PM
Points: 843, Visits: 38
For SQL SERVER 2000 it will work
Post #476678
Posted Sunday, March 30, 2008 1:53 PM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Wednesday, August 13, 2014 1:49 PM
Points: 328, Visits: 142
For SQL Server 2000 the statement will succeed... For SQL 2005 you need to qualify the Order by statement with the table name. This question should have been written more clearly.

Thanks
Un happy Member (I answered it from a 2000 point of view)



Thanks
Post #476724
Posted Sunday, March 30, 2008 4:56 PM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Sunday, August 3, 2014 10:04 PM
Points: 2,953, Visits: 437
The question doesn't specifically mentioned this is for SQL Server 2005, so I think we SQL Server 2000 users deserve some credit for answering "A" :D


Urbis, an urban transformation company
Post #476740
Posted Sunday, March 30, 2008 11:29 PM


SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Wednesday, March 14, 2012 12:32 AM
Points: 491, Visits: 39
Dear Friend,

Please provide all the information about the situtation and/or enviorment :).
It will work perfectly fine with SQL Server 2000.:D
But not with SQL Server 2005.

Thanks.

Regards,
Post #476781
Posted Sunday, March 30, 2008 11:41 PM
Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Thursday, May 15, 2014 3:13 AM
Points: 3,934, Visits: 124
Hi all

The suggested Answer is wrong



Post #476782
Posted Monday, March 31, 2008 1:02 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: Today @ 4:02 AM
Points: 798, Visits: 999
i do not think it's a matter of sql server version. ideally you/we should be able to answer without running the command.
but if you still want to run it, no one prevents you from adapting the script to match your (test) environment, table names, column names... etc

dragos
Post #476801
Posted Monday, March 31, 2008 1:03 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Wednesday, January 15, 2014 4:20 AM
Points: 87, Visits: 137
This works OK in SQL server 2000.

The question didn't specify which SQL version.

Post #476802
Posted Monday, March 31, 2008 1:36 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Yesterday @ 8:45 AM
Points: 1,049, Visits: 3,004
Hmm.

We have a multiple guess question that asks, "if you do this, what'll happen?". There isn't an option for, "in some situations this, in others that", so either there are two right answers or there aren't any.

Unfortunately, the QOTD, whilst only being a bit of fun (and good fun at that), suffers from rather frequent bad phrasing. I suspect Steve simply hasn't the time for the required level of sanity-checking.


Semper in excretia, sumus solum profundum variat
Post #476812
« Prev Topic | Next Topic »

Add to briefcase 12345»»»

Permissions Expand / Collapse