0

Working with my data set on Late Woodland Village reanalysis in QGIS, the previous question was somewhat answered by defining the issue as a many to one. As a work-around, I summarized the info into comma separated values within cells. For instance, temper would be SC, LS, H, SF as possible combinations. Likewise I have created a template of decorative attributes numbered from 1-77.

When I do a simple query for SC, it gives me all 15. But in Advanced Query, I get different answers.

In Dec Attributes, if I set the sample as 3, it gives me all of the strings with 3 in them, rather than just 3.

The first question is how do I select one string set out of all the others and the second question is how I select SC from Temper and 35 from Dec Attributes at the same time?

Thanks in advance.

0

1 Answer 1

2

As far as I remember, simple query implements the LIKE comparison. Therefore, a simple query for 'SC' in the "Temper" attribute would equal the following advanced query:

"Temper" LIKE '%SC%'

Similarly, to filter by two attributes at the same time:

"Temper" LIKE '%SC%' AND "Dec" = 35

if "Dec" contains only numerical values and not a list of values like "Temper".

5
  • OK, my syntax was incomplete for the first ones, basically I was using either ' or % but not both. But for the second question, under Dec, there are 77 potential numerical values, and if I am looking for 6 only, it gives me all occurrences of 6 as in 16, 26, etc. How do i get 6 only. I've tried dec = 6 and get the entire group. Thanks Commented May 16, 2013 at 16:16
  • 1
    @LyleBrowning Please post a screenshot of your attribute table.
    – underdark
    Commented May 16, 2013 at 16:17
  • Based on your answer, I changed the numbers to text, put a zero in front of those below 10 and it now works, as a workaround until I can work out the pivot text or many to one approaches suggested. Thanks Commented May 16, 2013 at 16:41
  • Where does one post a screenshot? Commented May 16, 2013 at 21:23
  • @LyleBrowning edit your question. you can put it there
    – underdark
    Commented May 17, 2013 at 5:56

Your Answer

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

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