According to your logic if:
ID_grandmom= mother's mother for a female and fathers mother for a male.
Then ID_grandfather by the same logic would mean= mothers father for a female and father's father for a male.
But then in that case for the female her father's father and her father's mother is not given. Nor is mothers father and mothers mother for a male student.
What I want from the above data is to generate paternal and maternal grandparents for each IDPERSON ( father's father, father's mother, mother's father, mother's mother ) irrespective of whether the IDPERSON id female or male.
ID_grandmom= mother's mother for a female and fathers mother for a male.
Then ID_grandfather by the same logic would mean= mothers father for a female and father's father for a male.
But then in that case for the female her father's father and her father's mother is not given. Nor is mothers father and mothers mother for a male student.
What I want from the above data is to generate paternal and maternal grandparents for each IDPERSON ( father's father, father's mother, mother's father, mother's mother ) irrespective of whether the IDPERSON id female or male.

Comment