M.E. -
That is what I stated in my very first posting. You will need to tweak that query so that it returns only the cs_id. Since the CM_DEVICE table contains a column for the cs_id, the following query should work:
SELECT
CM_DEVICE.cs_id
FROM
CM_RELATIONSHIP_CI_CS INNER JOIN
CM_CONFIGURATION_ITEM ON CM_RELATIONSHIP_CI_CS.source_id = CM_CONFIGURATION_ITEM.ci_id INNER JOIN
CM_DEVICE ON CM_RELATIONSHIP_CI_CS.target_id = CM_DEVICE.cs_id
where CM_CONFIGURATION_ITEM.ci_name like '%Resource Pool%';
If you get duplicate cs_id's in the output (because multiple dev_ids match for the same cs_id), you may have to tweak this query further. I am not a SQL query expert, but I think that this query will assure that you only get 1 cs_id for each match found:
SELECT DISTINCT
CM_DEVICE.cs_id
FROM
CM_RELATIONSHIP_CI_CS INNER JOIN
CM_CONFIGURATION_ITEM ON CM_RELATIONSHIP_CI_CS.source_id = CM_CONFIGURATION_ITEM.ci_id INNER JOIN
CM_DEVICE ON CM_RELATIONSHIP_CI_CS.target_id = CM_DEVICE.cs_id
where CM_CONFIGURATION_ITEM.ci_name like '%Resource Pool%';
Unfortunately, I do not have access to a vCenter in my lab so I can verify this query will work for you or not.