What are the tables that contain the drive name and size. I am trying to construct a query that has Caption, IP_Address, DNS, {Drive Letter}, {Drive Size} from dbo.Nodes and ?. Any help would be appreciated.
Of course I over looked it and of course it's called "Volumes" Lol
I'm having troubles with the join and my query though, I've made several changes and each change results in a different error. Could someone point out my error?
SELECT Nodes.Caption, Nodes.IP_Address, Nodes.DNS, Volumes.VolumeSize, Volumes.VolumeResponding FROM Nodes
INNER JOIN Nodes.NodeID ON Volumes.NodeID=Nodes.NodeID
WHERE Nodes.Outage_Notification_To = 'SRV0'
OR Nodes.Outage_Notification_To = 'SRV2'
ORDER BY Nodes.Caption DESC
I got the join to work but when I put the v.Caption, v.VolumeSpaceSize in the select I get a "Incorrect syntax near '.'"
SELECT n.Caption, n.IP_Address, n.DNS v.Caption, v.VolumeSpaceSize FROM Nodes n
INNER JOIN Volumes v ON n.NodeID= v.NodeID
WHERE n.Outage_Notification_To = 'SRV0'
OR n.Outage_Notification_To = 'SRV2'
ORDER BY n.Caption DESC
Well I figured it out, but it would be nice to convert the bytes to GB
SELECT n.Caption, n.IP_Address, n.DNS, v.Caption, v.VolumeSize FROM Nodes n
You would have to do something like
(v.VolumeSize/1024/1024/1024) as VolumeSize
To get the value in GB.