SELECT v3.Node.Caption, NodeID,
ROCred.Name as ROCredential, ROCred.SettingValue as ROCredential_Index,
Username, Context, PrivacyMethod, PrivacyKey, PrivacyKeyIsPassword, AuthenticationMethod, AuthenticationKey, AuthenticationKeyIsPassword,
RWCred.Name as RWCredential, RWCred.SettingValue as RWCredential_Index,
RWUsername, RWContext, RWPrivacyMethod, RWPrivacyKey, RWPrivacyKeyIsPassword, RWAuthenticationMethod, RWAuthenticationKey, RWAuthenticationKeyIsPassword
FROM Orion.SNMPv3Credentials v3
LEFT JOIN (SELECT SettingValue, NodeID, c.Name FROM Orion.NodeSettings ns JOIN Orion.Credential c ON c.ID = ns.SettingValue WHERE SettingName = 'ROSNMPCredentialID') ROCred ON ROCred.NodeID = v3.NodeID
LEFT JOIN (SELECT SettingValue, NodeID, c.Name FROM Orion.NodeSettings ns JOIN Orion.Credential c ON c.ID = ns.SettingValue WHERE SettingName = 'RWSNMPCredentialID') RWCred ON RWCred.NodeID = v3.NodeID