Difference of two tables

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

how do i subtract one sql statement from another (minus)?

Is there a way to pull out the results of one table that are not in another?
(ie. IPAddresses that are not used).
 
Well the IP address 'field' can be setup in 2 ways, either 4 numeric fields
(1 for each octet) or a string, if using the string idea (no good for
sorting), you are probably trying to map a subnet, e.g.

192.168.0.1 - 192.168.0.254

simply put it maybe easer to create a record for each IP address with a
description of it's use, then being able to do something like

select * from TblIP_Address Where Description="" giving you all the non
allocated IP Addresses.

sorry for going off on a tangent, but I think I can see where you are going
with this. If I am wrong post more information about what you are
specifically trying to do.
 
Yes, there is. Given two tables and a field that links the two (matching data
in tablea to data in tableB), you can use a query similar to the one below.
Access has a query wizard that will do this for you (Find Unmatched).

SELECT TableA.*
FROM TableA LEFT JOIN TableB
 
Back
Top