Jump to content

 
Photo

Select by attribute

- - - - - Select by attribute

  • Please log in to reply
2 replies to this topic

#1
nooos

nooos

    Contributor

  • Validated Member
  • PipPip
  • 22 posts
  • Cambodia

I get one field

data:12349,1235,456399,479,36899

I want to select data that the end of "99"

my vb

right("field",2 = "99")

but I can not do it.

Please help me big

               



#2
Fran├žois Goulet

Fran├žois Goulet

    Ultimate Contributor

  • Validated Member
  • PipPipPipPipPipPip
  • 689 posts
  • Gender:Male
  • Location:Mille-Isles, Qc
  • Interests:Cartography, History, Graphic Design and almost everything else...
  • Canada

I tried to use "right" to do a selection in ArcGIS and it didn't work. 

 

An easy way would be to create a field, populate it with the last two number of field2 -> right([field2],2) and then find 99. It's just weird I can populate a field using the right command, but not making a selection...

 

Be careful when using "", '' or []. In Arc, to do a selection, you put your field name between " " and your string values between ' '. When calculating a field, the fields are delimited with brackets [ ] and the string with double quotes " ". We could wish with consistency, but alas!



#3
katzmoye

katzmoye

    Contributor

  • Validated Member
  • PipPip
  • 14 posts
  • Gender:Female
  • Location:Portland, OR
  • United States

You could also create a new field that is text, calc it to be the same as your numeric field, then do a select like with a wildcard:

 

SELECT * FROM your_layer WHERE "your_text_field" LIKE '%99'






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

-->