How to list all devices with the groups where they belongs

Document ID : KB000071588
Last Modified Date : 21/02/2018
Show Technical Document Details
Introduction:
Customer needs a query that list all devices with the groups where they belongs
Instructions:
Use the next query to obtain the information:

MSSQL:
select DEV.dev_ip,DEV.dev_name , GRP.name from CM_GROUP_MEMBER as MEM , CM_DEVICE as DEV, CM_GROUP as GRP 
where MEM.cs_id = DEV.cs_id and MEM.grp_id = GRP.grp_id  order by MEM.cs_id     

ORACLE:
select DEV.dev_ip, DEV.dev_name, GRP.name from CM_GROUP_MEMBER MEM, CM_DEVICE DEV, CM_GROUP GRP where MEM.cs_id = DEV.cs_id and MEM.grp_id = GRP.grp_id order by MEM.cs_id