2 comments:

Your example is very easy to understand but that is wrong in this case?WITH ANCESTORS_PERSON_1 AS( select MOTHER_CNP, FATHER_CNP from [dbo].[PERSON] start with PERSON_ID=1 connect by PERSON_ID = prior MOTHER_CNP or PERSON_ID = prior FATHER_CNP) Incorrect syntax near 'PERSON_ID' but I do not understand why