Bug report #11628

Cannot filter by number

Added by Jonathan Moules over 9 years ago. Updated about 5 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Attribute table
Affected QGIS version:2.6.0 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:end of life
Crashes QGIS or corrupts data:No Copied to github as #:19881

Description

Default install of 2.6 on Windows, no plugins beyond what comes with it plus OpenLayers. (Also evident in 2.2 and 2.4).

I'm connecting to an Oracle database, it has a column (SEED_ID) of type Number (20,0).

The contents of this column are of this form:
70410000000004734180
70410000000004734181
70410000000004734182

However, QGIS in the attribute table is showing:
7.04100000000047e+19
7.04100000000047e+19
7.04100000000047e+19

Which seems weird because that's just as many characters as the number it's supposed to be replacing, but anyway.
It's also 100% useless because as you can see, they all show exactly the same values.

Furthermore, if I do "Column Filter" -> "SEED_ID", and enter:
70410000000004734180

I get no results. The query it's doing is:
"SEED_ID" = '70410000000004734180'

I've tried a few variants:

The following all fail with no results, but they SHOULD work (give or take):
"SEED_ID" = '70410000000004734180'
"SEED_ID" = 70410000000004734180
"SEED_ID" like '70410000000004734180'
"SEED_ID" like '%0000000004734180'
"SEED_ID" like '%4180'

This return all features:
"SEED_ID" like 70410000000004734180
"SEED_ID" like '%00000000047e+19'

So basically, the filter isn't filtering actual content, but is instead filtering against scientific notation. And it's impossible to filter by such columns currently.

Should it be a blocker? Seems to be failing at a fundamental GIS feature.

(Same also applies to Query Builder for a feature subset).

History

#1 Updated by Giovanni Manghi almost 7 years ago

  • Easy fix? set to No
  • Regression? set to No

#2 Updated by Giovanni Manghi about 5 years ago

  • Resolution set to end of life
  • Status changed from Open to Closed

Also available in: Atom PDF