Dear suppport,
i hope you can help me in this. I have the following datasets ("info" and "score").
id | id2 | faculty | name | surname | course | 1 | x | science | mark | red | math | 2 | y | science | lewis | green | math | 3 | z | eng | joshua | yellow | math | 3 | z | eng | joshua | yellow | english |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
score
id | id2 | name | surname | course | mark |
1 | x | mark | red | math | 5 |
3 | x | mark | red | english | 6 |
3 | z | joshua | yellow | math | 7 |
3 | z | joshua | yellow | english | 8 |
4 | z | joshua | yellow | art | 9 |
What i would like to achieve is to insert some information in "info" that recursively check based on some criteria if a specific entry on the "infor" is on score and if not append the new result in "infor". In detail it should check if Name and surname and id2 are in the score and only if the course is different append that line in "infor". My issue is that i have tried to do a data merge (and dropping one value) but unsuccessfull as the id field and faculty is wrong (not aligned with the infor or empty) .
The expected result should be like this:
id | id2 | faculty | name | surname | course |
1 | x | science | mark | red | math |
2 | y | science | lewis | green | math |
3 | z | eng | joshua | yellow | math |
3 | z | eng | joshua | yellow | english |
1 | x | science | mark | red | english |
3 | z | eng | joshua | yellow | art |
with the last two observation inserted accordingly.
I wonder if is possible to loop through the dataset and check/compare (with if statements) and proceed to create the observation.
If you can post a link or guide me through into the right direction it would be amazing.
Many thanks
Luca