Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I want to extract certain years and certain age groups.
This code works to extract the age groups (ages 0-5 years):
where Alder_1agr = '5 år' or Alder_1agr = '4 år' or Alder_1agr = '3 år' or Alder_1agr = '2 år' or Alder_1agr = '1 år' or Alder_1agr = '0 år';
And this code works to extract the years I want:
where INTAAR > 2014;
But when I combine like this:
where Alder_1agr = '5 år' or Alder_1agr = '4 år' or Alder_1agr = '3 år' or Alder_1agr = '2 år' or Alder_1agr = '1 år' or Alder_1agr = '0 år'
and INTAAR > 2014;
.....the result I get is an extraction of age groups but the extraction of years dos not work (I get all the years).
I cannot figure out why.
Try adding some parentheses so the conditions are grouped together properly:
where (Alder_1agr = '5 år' or Alder_1agr = '4 år' or Alder_1agr = '3 år' or Alder_1agr = '2 år' or Alder_1agr = '1 år' or Alder_1agr = '0 år')
and INTAAR > 2014;
Try adding some parentheses so the conditions are grouped together properly:
where (Alder_1agr = '5 år' or Alder_1agr = '4 år' or Alder_1agr = '3 år' or Alder_1agr = '2 år' or Alder_1agr = '1 år' or Alder_1agr = '0 år')
and INTAAR > 2014;
Thank you! (How silly of me.)