5

I was trying to select all values over 75000 in Select by Attributes.

Surely I thought doing so would do just that, but it's essentially selecting only values that begin with 75 and 8 and 9 (even includes a low value like 900) and leaving out values like 100000, 200000, and 700000. I entered this:

SDE_DATE.DBO.Parcels.Total_AV > '75000'

Do you know how I can select all values greater than 75,000?

  • 1
    Get rid of the quotes. – Fezter Oct 27 '16 at 17:26
  • Unfortunately this message pops up if I do that: There was an error with the expression. An invalid SQL statement was used. ...Might be how my system is set up, but it's not very lenient. – GeoFact of the Day Oct 27 '16 at 17:28
  • Thanks Fezter...I just had to convert field to Numeric, and now I can select without quotes. – GeoFact of the Day Oct 27 '16 at 17:46
7

Select By Attribute is working fine, but your values are actually stored as text, not as numbers. Therefore, they are being sorted alphabetically instead of numerically, and your greater-than operation is also sorting alphabetically. You will need to either add a new numeric field and populate it with the values in your existing Total_AVfield (if there are any text values in that field and you want to keep them), or convert that field to a numeric type.

3

You should not put 75000 in quotes.

SDE_DATE.DBO.Parcels.Total_AV > 75000
  • Unfortunately this message pops up if I do that: There was an error with the expression. An invalid SQL statement was used. ...Might be how my system is set up, but it's not very lenient. – GeoFact of the Day Oct 27 '16 at 17:26
  • 2
    Your field is string, convert it to nimeric – FelixIP Oct 27 '16 at 17:28
  • Might be characters in the field? – Hydrographer Oct 27 '16 at 17:33
  • Yep, converting to numeric did the trick...thanks! Thanks for your help, FelixIP and Hydrographer! – GeoFact of the Day Oct 27 '16 at 17:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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