2

I am working with agriculture and looking at two farms and using the query builder.

Each one has the same Farm Number (FSN) so I am trying to show particular tracts of land from those FSNs and particular Common Land Units (CLUs).

Is there a way to write a query to basically tell the system, "I want to see clus 1 and 2 from tract 443 and clus 1 and 4 from tract 442 both from farm 551?

I have been creating new layers for each tract, but I know there has to be a more elegant way to do this.

This is what I have for getting one tract:

state_code = '22' AND county_code = '053' AND farm_number = '516' AND tract_number = '228' AND clu_number IN ('17', '21')`

What would I need to do to get another tract and its clus from the same farm in this query?

0
0

You can use the brackets within the query builder to create multiple querys for the same dataset. By using "OR" inbetween the brackets, this will show the different results within the same layer. In this case you would just copy and paste the query, changing the different tracs or clus to show different results.

For example

(state_code = '22' AND county_code = '053' AND farm_number = '516' AND tract_number = '228' AND clu_number '17') OR (state_code = '22' AND county_code = '053' AND farm_number = '516' AND tract_number = '228' AND clu_number '23')
2
  • Thank you! I was close but was trying to bracket the tracts and clus with an or statement after defining the state, county and farm. Your method solved my issue.
    – Detritus
    Aug 25 '16 at 15:06
  • Trying to, I have to wait for a brief time limit. :)
    – Detritus
    Aug 25 '16 at 15:07

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.