Hi All.I try to compare and select data from table that which not in other tableSelect AAA_Id,BBBFrom dbo.Table1 aWhere AAA_Id not in(Select b.AAA_Id From dbo.Table2 b, dbo.Table1 a Where b.AAA_Id = 11)
but when I modified it like:Select AAA_Id,BBBFrom dbo.Table1 aunionSelect0,'Select'From dbo.Table1 aWhere AAA_Id not in(Select b.AAA_Id From dbo.Table2 b, dbo.Table1 a Where b.AAA_Id = 11)Order by 2
I cannot to get same result. How to fix problem?Thanks.