Simple question

1963
6
Jump to solution
11-10-2014 05:44 AM
KarenSnitzer
New Contributor

New student here...

I am trying to select by attributes, but when I put in the query, no records are selected.  I looked at one record in the table and there are multiple features under the tree.  Can this be causing the problem?  And how can I get around it?

Thanks.

0 Kudos
1 Solution

Accepted Solutions
StevenGraf1
Occasional Contributor III

You could write your query as such also:

"LANDCODE" IN ('941', '980', '910', '940', '930', '734')

Here is a SQL Query Reference Guide.

Steven

View solution in original post

6 Replies
TimWitt2
MVP Alum

Hi Karen,

Can you post your query here?

Tim

0 Kudos
KarenSnitzer
New Contributor

When I selected each row manually from the attribute table and made it into a layer it worked. 

Here is how I did the query tho for those attributes:

LANDCODE = '941' AND LANDCODE = '980' AND LANDCODE = '910' AND LANDCODE = '940' AND LANDCODE = '930' AND LANDCODE = '734'

I don't understand why it wouldn't do the same thing as selecting each row manually, tho. Can you explain?

Thanks!

0 Kudos
KarenSnitzer
New Contributor

Capture_of_ArcGIS.png

0 Kudos
TimWitt2
MVP Alum

Karen,

instead of AND use OR. When you use AND it looks for a row that has all of the LANDCODE you specify in it.

With OR it selects each number.

Tim

StevenGraf1
Occasional Contributor III

You could write your query as such also:

"LANDCODE" IN ('941', '980', '910', '940', '930', '734')

Here is a SQL Query Reference Guide.

Steven

KarenSnitzer
New Contributor

Thanks!! I'll try both methods!

Karen

0 Kudos