Subject | Using field alias in having clause |
---|---|
Author | Uwe Grauer |
Post date | 2008-02-21T22:24:18Z |
In the query
"SELECT E_TOK, E_VAL, count(*) as ent_count
FROM ENUM
group by E_TOK, E_VAL
having ent_count > 1"
i get this:
Dynamic SQL Error
SQL error code =-206
Column unknown
ENT_COUNT
Using "having count(*) > 1" doesn't give an error.
Can someone please explain the reason for this?
Uwe
"SELECT E_TOK, E_VAL, count(*) as ent_count
FROM ENUM
group by E_TOK, E_VAL
having ent_count > 1"
i get this:
Dynamic SQL Error
SQL error code =-206
Column unknown
ENT_COUNT
Using "having count(*) > 1" doesn't give an error.
Can someone please explain the reason for this?
Uwe