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

PostgreSQL NULL sorting behavior #6

Open
jacobdadams opened this issue Feb 5, 2020 · 0 comments
Open

PostgreSQL NULL sorting behavior #6

jacobdadams opened this issue Feb 5, 2020 · 0 comments
Labels
known-issue We understand there is an issue with-workaround This issue has a work around

Comments

@jacobdadams
Copy link
Member

jacobdadams commented Feb 5, 2020

The problem

The Open SGID sorts NULL values in the opposite direction than the SGID and esri file geodatabases.

The reason

A PostgreSQL order by ascending query will order NULL values last, while the SGID (Microsoft SQL Server) and file geodatabases order them first.

The workaround

Invert the sort to have NULL values ordered they way you would like.

Examples

The PostgreSQL language supports the NULL value ordering in the ORDER BY clause. documentation

The following will crash ArcGIS Pro version < 2.5 if used as a query layer query.

SELECT * FROM municipal_boundaries ORDER BY minname NULLS FIRST;
@steveoh steveoh changed the title NULL sorting behavior ArcGIS NULL sorting behavior Mar 31, 2020
@steveoh steveoh changed the title ArcGIS NULL sorting behavior PostgreSQL NULL sorting behavior Mar 31, 2020
@steveoh steveoh added known-issue We understand there is an issue with-workaround This issue has a work around labels Mar 31, 2020
@agrc agrc locked as resolved and limited conversation to collaborators Apr 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
known-issue We understand there is an issue with-workaround This issue has a work around
Projects
None yet
Development

No branches or pull requests

2 participants