Select the product you need help with
You receive an error message when you perform a query that contains an alias that has the same name as two or more columns in the ORDER BY clauseArticle ID: 890771 - View products that this article applies to. SYMPTOMSWhen you try to perform a query in Microsoft SQL Server
2000, you receive the following error message: Server: Msg
169, Level 15, State 3, Line 8 A column has been specified more than once in the order by list. Columns in the order by list must be unique.
CAUSEThis problem occurs because the ORDER BY clause list must be
unique. When an alias that has the same name in the SELECT clause is specified, the
ORDER BY clause list is no longer unique. WORKAROUNDTo work around this problem, you must make sure that the
alias that you specified in the SELECT clause is unique if you are going to
include the column in the ORDER BY clause list. For example, when you run the
following Transact-SQL script, no error message is returned: STATUS This behavior is by
design. Properties |


Back to the top








