You have aliased two columns as published.
a.published,
and
CASE a.type
WHEN N'component' THEN a.published+2*(e.enabled-1)
WHEN N'url' THEN a.published+2
WHEN N'alias' THEN a.published+4
WHEN N'separator' THEN a.published+6 END AS published,
More Related Contents:
- SQL Server – error when creating stored procedure
- Insert multiple rows WITHOUT repeating the “INSERT INTO …” part of the statement?
- How can I escape square brackets in a LIKE clause?
- Parameter Sniffing (or Spoofing) in SQL Server
- How can I truncate a datetime in SQL Server?
- What are the main performance differences between varchar and nvarchar SQL Server data types?
- Datatype for storing ip address in SQL Server
- SQL Server: Query fast, but slow from procedure
- Is there a way to loop through a table variable in TSQL without using a cursor?
- sql server invalid object name – but tables are listed in SSMS tables list
- Concatenating Column Values into a Comma-Separated List
- What columns generally make good indexes?
- List the queries running on SQL Server
- SQL Server Bulk insert of CSV file with inconsistent quotes
- What is a free tool to compare two SQL Server Databases? [closed]
- SQL Server Query: Fast with Literal but Slow with Variable
- How can I make HTTP request from SQL server?
- SQL Server Management Studio alternatives to browse/edit tables and run queries [closed]
- Format SQL in SQL Server Management Studio
- SQL Server, the misleading XLOCK & optimizations
- #DELETE viewing SQL Server table in Access
- Grant Select on a view not base table when base table is in a different database
- SQL Server (localdb)\v11.0 explained
- migrate data from MS SQL to PostgreSQL?
- SQL Server – join rows into comma separated list
- SQL Server 2008 can’t login with newly created user
- Update SQL with consecutive numbering
- Nested transactions in Sql Server
- What is the difference between Cartesian product and cross join?
- Count number of records returned by group by