How to convert subquery to table-join? Urgent!

From: Mary.M <mmrgood_at_sina.com>
Date: 6 Jan 2002 18:48:24 -0800
Message-ID: <59b71f2d.0201061848.3bb6fd05_at_posting.google.com>


Hi, all gurus!

Now I have a hard nut to crack. I must move my program from sybase to mysql,but as you know, mysql does not support subquery. I know I should make a subquery-to-join, but in the case of "not in", I am just at the end of my tether. I don't know how to convert it.

For example:
select a.IPAddress,b.NodeStatus
from NodeInSubnet a,TopoNode b
where (a.NodeID=b.NodeID)
and (a.IPAddress not in

(select interfaceIP

	from pollNodesInfo 
	where (pollLevel in (0,1,2)) 
	and (isChecked in(0,1)))) 
and (a.IPAddress not in 

(select IPAddress from TopoIP))

How to convert the above sentence? Any idea will be appreciated.

Thanks in advance! Received on Mon Jan 07 2002 - 03:48:24 CET

Original text of this message