Use “result expression” from CASE expression in WHERE clause?

SQL-Server requires a table alias: SELECT * from ( SELECT first_name, last_name, CASE WHEN weight.

SELECT * from ( SELECT first_name, last_name, CASE WHEN weight.

Please add the required table alias. Tag says SQL-Server. – bernd_k Dec 30 '10 at 12:04.

I think you will have to use HAVING instead of WHERE: SELECT first_name, last_name, weight_class = CASE WHEN weight 214 AND weight.

Unlike MySQL You can't use column aliases in the having clause in SQL Server. +1 For the second query though which will potentially be more efficient as it allows an index range seek rather than an entire scan. – Martin Smith Dec 30 '10 at 12:07.

You can also use CROSS APPLY for this. Spiny Norman's second answer is the preferable way of doing this as it keeps the predicate sargable however. SELECT first_name, last_name, weight_class FROM athletes CROSS APPLY (SELECT CASE WHEN weight.

You can also use CROSS APPLY for this. Spiny Norman's second answer is the preferable way of doing this as it keeps the predicate sargable however. Terms of service.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions