I am trying to get a list of values in a table where the PARENTID is not in the
ID column...
i.e
Select ID From MailTree WHERE ParentID NOT IN (Select ID From MailTree)
ID is an integer, and ParentID is a DOUBLE with 3 decimal places
I am trying to cast ParentID as an integer, so it can match format with PARENTID
and return the correct results, but it doesn't seem to work...
i.e
Select ID From MailTree WHERE Cast(ParentID as Unsigned) NOT IN (Select ID From
MailTree)
But this doesn't return the required results.
Any ideas?
I am using MySql version 5.
Greg