SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


ORDER BY


ORDER BY

Author
Message
kevriley
kevriley
SSCarpal Tunnel
SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)

Group: General Forum Members
Points: 4280 Visits: 2635
Comments posted to this topic are about the item ORDER BY
pipe
pipe
SSChasing Mays
SSChasing Mays (624 reputation)SSChasing Mays (624 reputation)SSChasing Mays (624 reputation)SSChasing Mays (624 reputation)SSChasing Mays (624 reputation)SSChasing Mays (624 reputation)SSChasing Mays (624 reputation)SSChasing Mays (624 reputation)

Group: General Forum Members
Points: 624 Visits: 62
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 Smile) 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"
gbpthomas
gbpthomas
SSC Eights!
SSC Eights! (851 reputation)SSC Eights! (851 reputation)SSC Eights! (851 reputation)SSC Eights! (851 reputation)SSC Eights! (851 reputation)SSC Eights! (851 reputation)SSC Eights! (851 reputation)SSC Eights! (851 reputation)

Group: General Forum Members
Points: 851 Visits: 38
For SQL SERVER 2000 it will work
Deadwood
Deadwood
Old Hand
Old Hand (373 reputation)Old Hand (373 reputation)Old Hand (373 reputation)Old Hand (373 reputation)Old Hand (373 reputation)Old Hand (373 reputation)Old Hand (373 reputation)Old Hand (373 reputation)

Group: General Forum Members
Points: 373 Visits: 162
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
Iggy-SQL
Iggy-SQL
Hall of Fame
Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)

Group: General Forum Members
Points: 3251 Visits: 440
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" BigGrin


Urbis, an urban transformation company
Mr. DBA
Mr. DBA
SSC-Addicted
SSC-Addicted (498 reputation)SSC-Addicted (498 reputation)SSC-Addicted (498 reputation)SSC-Addicted (498 reputation)SSC-Addicted (498 reputation)SSC-Addicted (498 reputation)SSC-Addicted (498 reputation)SSC-Addicted (498 reputation)

Group: General Forum Members
Points: 498 Visits: 41
Dear Friend,

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

Thanks.

Regards,
far
far
SSCarpal Tunnel
SSCarpal Tunnel (4.9K reputation)SSCarpal Tunnel (4.9K reputation)SSCarpal Tunnel (4.9K reputation)SSCarpal Tunnel (4.9K reputation)SSCarpal Tunnel (4.9K reputation)SSCarpal Tunnel (4.9K reputation)SSCarpal Tunnel (4.9K reputation)SSCarpal Tunnel (4.9K reputation)

Group: General Forum Members
Points: 4882 Visits: 141
Hi all

The suggested Answer is wrong



dragos_sv
dragos_sv
SSC Eights!
SSC Eights! (939 reputation)SSC Eights! (939 reputation)SSC Eights! (939 reputation)SSC Eights! (939 reputation)SSC Eights! (939 reputation)SSC Eights! (939 reputation)SSC Eights! (939 reputation)SSC Eights! (939 reputation)

Group: General Forum Members
Points: 939 Visits: 1029
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
Jason Campbell-349945
Jason Campbell-349945
SSC Journeyman
SSC Journeyman (91 reputation)SSC Journeyman (91 reputation)SSC Journeyman (91 reputation)SSC Journeyman (91 reputation)SSC Journeyman (91 reputation)SSC Journeyman (91 reputation)SSC Journeyman (91 reputation)SSC Journeyman (91 reputation)

Group: General Forum Members
Points: 91 Visits: 142
This works OK in SQL server 2000.

The question didn't specify which SQL version.

Cool
majorbloodnock
majorbloodnock
SSCrazy
SSCrazy (2.5K reputation)SSCrazy (2.5K reputation)SSCrazy (2.5K reputation)SSCrazy (2.5K reputation)SSCrazy (2.5K reputation)SSCrazy (2.5K reputation)SSCrazy (2.5K reputation)SSCrazy (2.5K reputation)

Group: General Forum Members
Points: 2495 Visits: 3064
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
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search