Aug 5, 2001 #1 xenomage Programmer Jun 27, 2001 98 SG Hi all, i need to write a recursive loop in asp. i have a adodb table that is like this... id parentid 1 0 2 0 3 0 4 0 5 1 6 1 7 2 8 4 9 5 10 5 i need to get the terminal ids(id which is not a parent id of any id) of the table.. please help many thanks. xeno
Hi all, i need to write a recursive loop in asp. i have a adodb table that is like this... id parentid 1 0 2 0 3 0 4 0 5 1 6 1 7 2 8 4 9 5 10 5 i need to get the terminal ids(id which is not a parent id of any id) of the table.. please help many thanks. xeno
Aug 6, 2001 #2 dianal Instructor Mar 7, 2001 273 BG Hello, Try using nested query "select id from tblParents where id not in (select parentid from tblParents)" select parentid from tblParents will return a set of all parentid. "id not in" above set will return all ids that are not in set of parentid - that you need. D. Upvote 0 Downvote
Hello, Try using nested query "select id from tblParents where id not in (select parentid from tblParents)" select parentid from tblParents will return a set of all parentid. "id not in" above set will return all ids that are not in set of parentid - that you need. D.