Please could someone help me with an example of SQL for Interbase with recursivity?
I have a model for SQL Server that works very well but when it does not work on Interbase.
If possible could you please send an example in Interbase to email@example.com
Thank you very much.
The code in SQL Server is:
SELECT FAMILYID , NULL PARENTID, 1 as GRAU, DESCRIPTION
WHERE FAMILYID = 30
SELECT S.FAMILYID , S.PARENTID, GRAU +1 , S.DESCRIPTION
FROM PRODUCT_FAMILIES AS S
INNER JOIN MyCTE ON S.PARENTID = MyCTE.FAMILYID
WHERE S.PARENTID <> S.FAMILYID
SELECT FAMILYID, PARENTID, GRAU, DESCRIPTION
ORDER BY GRAU option (maxrecursion 0)