I’ve done more complex queries and I am stumped.
table:
STEPS (id, rank, description)
ELEMENTS (element, element_id, year_code)
The tables relate by STEPS.id = ELEMENTS.element_id where ELEMENTS.year_code = 2010
I want to retrieve a step, by its rank, but it needs to check the element table to make sure I pull the appropriate step, because there could be two steps with the same rank, but that is where the year_code comes into play, there is no duplicate ranks for the same year.
So I want to view the step
where steps.rank = 1.2.4 and elements.year_code = 2010
any help is appreciated
The steps table holds all the steps and the elements table keeps track of what year the step belongs to.
I don’t have a link field, so I’m just going to use
elements.step_idto link the fields.Adjust the query to your field names.
Or perhaps you meant: