I'm no SQL expert but the query does work I do notice that it takes longer to run using the or statement instead of an and statement
1 of 1 people found this helpful
You are not joining the tables correctly.
pedantically you're performing a cross-join between three tables which multiple is the number of rows between the tables and performing a restrict on the result set.
I think this is what you really want to get:
SELECT caption AS Hostname,
ip_address AS IP,
site_adderess AS Location,
LEFT OUTER JOIN assetinventory_software
ON nodesdata.nodeid = assetinventory_software.nodeid
LEFT OUTER JOIN nodescustomproperties
ON nodesdata.nodeid = nodescustomproperties.nodeid
gives you ALL the rows from nodesdata and any matching data from the other two tables
Thank you Richard, its been a while since I took that SQL class...