Posted by --CELKO-- on 12/23/06 20:33
A quick lesson in good software engineering and SQL: Put the sort key
into a column in your result SELECT list and give it a name.
1) Good SQL: Using an expression in an ORDER BY clause is a
proprietary "feature" in SQL Server and not Standard SQL. The ORDER BY
caluse is alawyas part of a cursor, not a SELECT statement, since
DSELECT produces a table which has no order by definition.
2) Good S.E.:Always show what you used to sort a result set to the next
tier of the architecture. They might need to use it. Hey, the final
user might fidn data easier to find on his display if it was there!
Navigation:
[Reply to this message]
|