I have a table in which there are the following 2 columns: sitm and pitm.
sitm is the child item, and pitm is the parent item. i would like to find all child items that are not parent items.
I would have thought that the following query would do this:
select sitm from lhpms010
where not exists (select pitm from lhpms010)
It doesn't return any results although there are certainly items in the sitm column that do not exist in the pitm column. I got the following solution from the SQL forum here, but as i am using SQLServer the 'minus' operator is not supported...
SELECT sitm FROM lhpms010
SELECT pitm FROM lhpms010;
Any body know how i can implement this query with SQL Server?