I should give up on SQL

Stared and stared and stared at the "is null"/"is not null" constraints and had to post to twitter to find the answer. Very annoying that I missed something so obvious, but I still don't know why it would munge the value of "parent_pid" and "child_pid" in the first query. (Update: Of course I know why it would munge that value. I need a drink).

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
Without JavaScript enabled, you might want to
use the classic discussion system instead. If you login, you can remember this preference.