Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow Column alias in HAVING clause [CORE887] #1280

Open
firebird-automations opened this issue Aug 3, 2006 · 3 comments
Open

Allow Column alias in HAVING clause [CORE887] #1280

firebird-automations opened this issue Aug 3, 2006 · 3 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Michael Trowe (bubble76)

Votes: 6

Using the column-alias works in the group-by clause but not in the having-clause.

Example:

select FIELD_1 "FIELD1", sum(MY_FIELD) "SUM_FIELD"
from MY_TABLE
group by "FIELD1"
having "SUM_FIELD" > 0

@firebird-automations
Copy link
Collaborator Author

Commented by: Maycon Ferraca (ferraca)

Extend syntax allowing that columns aliases can be referenced in WHERE clause and in another columns aliases. Following the example:

SELECT
RDB$RELATION_ID AS ID,
'id: ' || ID
FROM RDB$RELATIONS
WHERE ID = 1;

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

Workflow: jira [ 11125 ] => Firebird [ 14677 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: Sean Leyne (seanleyne)

summary: Column-alias in having-clause => Allow Column alias in HAVING clause

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant