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

Request: add support for CREATE VIEW with ORDER BY clause #3465

Closed
monetdb-team opened this issue Nov 30, 2020 · 0 comments
Closed

Request: add support for CREATE VIEW with ORDER BY clause #3465

monetdb-team opened this issue Nov 30, 2020 · 0 comments
Labels
enhancement New feature or request SQL

Comments

@monetdb-team
Copy link

Date: 2014-04-04 17:41:26 +0200
From: Martin van Dinther <<martin.van.dinther>>
To: SQL devs <>
Version: -- development

Last updated: 2017-07-17 16:07:20 +0200

Comment 19730

Date: 2014-04-04 17:41:26 +0200
From: Martin van Dinther <<martin.van.dinther>>

User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:28.0) Gecko/20100101 Firefox/28.0
Build Identifier:

An ORDER BY clause in the creation of a VIEW is currently not supported.
It is very desirable to have this supported, as it allows you to predefine the ordering per view. This allows it to be used for meaningful (ordered) reporting.

Reproducible: Always

Steps to Reproduce:

CREATE VIEW user_tables AS
SELECT * FROM sys.tables WHERE NOT system AND query IS NULL
ORDER BY name;

Actual Results:

Error: CREATE VIEW: ORDER BY not supported
SQLState: 42000

Expected Results:

The view to be created and the ordering applied during querying.

Comment 25079

Date: 2017-03-02 15:00:55 +0100
From: MonetDB Mercurial Repository <>

Changeset 2bac5d524bcb made by Martin van Dinther martin.van.dinther@monetdbsolutions.com in the MonetDB repo, refers to this bug.

For complete details, see http//devmonetdborg/hg/MonetDB?cmd=changeset;node=2bac5d524bcb

Changeset description:

Remove the restriction to use an ORDER BY clause in a CREATE VIEW statement.
Added tests to prove this works correctly.
This implements request: bug #3465
@monetdb-team monetdb-team added enhancement New feature or request SQL labels Nov 30, 2020
@sjoerdmullender sjoerdmullender added this to the Ancient Release milestone Feb 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request SQL
Projects
None yet
Development

No branches or pull requests

2 participants