1

I have an attribute table where 2 columns have values in common. What I need is to Select by attributes the rows that have the same values, for this I'm doing:

"w_min"= "MIN_W_MIN" AND "MIN_W_MIN" <> 0

Because I want to select the rows that have the same values in field w_min and field MIN_W_MIN.

What's happening is that it's not selecting those rows and I don't know why. It only select the rows that have 0 in this two fields. Because of that I put the query MIN_W_MIN <> 0

What could be the cause of that failure in selection?

1 Answer 1

3

What can cause the failure is that the two fields have not the same data type (ex : : integer and text). You could for example have NULL or "" values hidden. What I suggest :

  • Check datatypes of the two columns

  • If similar, select "MIN_W_MIN" <> 0 - see if it works

  • Select "w_min"= "MIN_W_MIN" - see if it works

  • If not similar, create new columns to match the right datatype (integer or float ?) then retry previous tests.

When both tests are passed, you should be able to run a single query or rerun a query on the result of the first query to mimic the clause AND.

1
  • w_min is float and MIN_W_MIN is double. Is this the cause?
    – AndM
    Sep 17, 2015 at 10:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.