General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
>So ... Having 2 # 0
>
>????
Sorry, that was a dumb answer. Position works in GROUP BY and ORDER BY. I don't see a solution other than using a different field name. However, if it's important to have the specified field name in the result, do the grouping/having in a derived table and rename the field in the result:
SELECT a as a, b as b, q as c, ... ;
FROM (SELECT ..., whatever as q .... HAVING q>5)
Tamar
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only