I have a group of three tables TBL_ServerInformationSerialNumber ServerName ------------------------ 1 Phantom 2 Mirage 3 Skyhawk 6 Bison 9 Fuga 15 shark 16 Tuna TBL_ServerIPUniqueID IPAddress SerialNumber----------- --------------- ------------1 1.1.1.3 12 1.1.1.4 13 1.1.1.5 14 1.2.3.4 25 1.2.3.5 26 12.34.67.89 37 216.45.67.89 158 23.56.89.0 69 255.255.25.1 910 32.67.90.3 1611 89.80.45.7 6UniqueID PortNumber ----------- ----------- 1 7400 1 7401 2 7434 2 65000 2 7654 3 54 3 21 3 4566
I am running the query SELECT dbo.TBL_ServerInformation.ServerName, dbo.TBL_ServerIP.IPAddress, dbo.TBL_Port.PortNumberFROM dbo.TBL_ServerInformation INNER JOINdbo.TBL_ServerIP ON dbo.TBL_ServerInformation.SerialNumber = dbo.TBL_ServerIP.SerialNumber INNER JOIN dbo.TBL_Port ON dbo.TBL_ServerIP.UniqueID = dbo.TBL_Port.UniqueID
And in the result I get the same name for all entries instead of the correct names pleas helpServerName IPAddress PortNumber------------ --------------- -----------Phantom 1.1.1.3 7400Phantom 1.1.1.3 7401Phantom 1.1.1.4 7434Phantom 1.1.1.4 65000Phantom 1.1.1.4 7654Phantom 1.1.1.5 54Phantom 1.1.1.5 21Phantom 1.1.1.5 4566