I have wrote this SQL code but cannot find the problem with it
Select
Nodes.Caption AS ServerName,
Nodes.DeviceRole AS DeviceRole,
(
SELECT
Nodes.Caption
FROM dbo.NodeIPAddresses AS Ips
)
FROM dbo.Nodes
Well, am guessing that you just want to to list out Caption, DeviceRole and IP Address. If so, the query is a bit off. Try this:
Select
Nodes.Caption AS ServerName,
Nodes.DeviceRole AS DeviceRole,
Nodes.IP_Address AS Ips
FROM dbo.Nodes
Not sure why you were including a subselect there, for information from the same table.
SolarWinds solutions are rooted in our deep connection to our user base in the THWACK® online community. More than 195,000 members are here to solve problems, share technology and best practices, and directly contribute to our product development process.