Bug report #5220

Query builder uses strings as numbers?

Added by Giovanni Manghi over 12 years ago. Updated over 12 years ago.

Status:Closed
Priority:High
Assignee:-
Category:Vectors
Affected QGIS version:1.7.4 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:invalid
Crashes QGIS or corrupts data:No Copied to github as #:14956

Description

I just noticed in qgis 1.7.4 and master that if I build a query like "DISTRITO" > 'FARO' or "NUM_F" > '175' (where "NUM_F" is a string column) that (to me) should make any sense and then return an error, instead returns "The where clause returned xxx row(s).". Is this on purpose or is a bug? If is a feature, what is the meaning?

Tested on 1.7.4 and master

History

#1 Updated by Jürgen Fischer over 12 years ago

Do you mean "shouldn't make any sense"? But even then I don't understand what the problem with "NUM_F" > '175' is - please elaborate. > is also defined for strings.

#2 Updated by Giovanni Manghi over 12 years ago

Hi Jurgen, thanks for the feedback.

Jürgen Fischer wrote:

Do you mean "shouldn't make any sense"?

yes sorry

But even then I don't understand what the problem with "NUM_F" > '175' is - please elaborate.

I didn't expected to have operators like > to work with strings.

> is also defined for strings.

How > works for strings?

#3 Updated by Jürgen Fischer over 12 years ago

Giovanni Manghi wrote:

How > works for strings?

Um, isn't that obvious? E.g. in an ordered list of (unique) names each entry is < than the next and > than the previous one.

#4 Updated by Giovanni Manghi over 12 years ago

  • Status changed from Open to Closed
  • Resolution set to invalid

#5 Updated by Giovanni Manghi over 12 years ago

Jürgen Fischer wrote:

Giovanni Manghi wrote:

How > works for strings?

Um, isn't that obvious?

frankly? :) no... from a user point of view it wasn't that obvious, but after a few tests I got it. I didn't had the time yet to check if is documented, we would need eventually to add a note in the manual. Sorry for bugging.

#6 Updated by Giovanni Manghi over 12 years ago

  • Target version changed from 35 to Version 1.8.0

Also available in: Atom PDF