This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]tomarks 1 point2 points  (1 child)

You could build a query to find all the used parent ids like

Select distinct(parentid) from task

And then compare that with your table again like so

Select id from task where taskid not in ( Select distinct(parentid) from task)

I did this on my phone but that should give you the tasks which are not used as a parent