I want to be able to return multiple values in a subquery, preferably in a comma delimited list. I am using PostgreSQL and ColdFusion. Is there a simple way to accomplish this?
For example, I want something like:
SELECT t.id, t.val2, t.val3,
(SELECT s.id FROM state s WHERE t.id = s.id) as arrayOfStates
FROM table t
Any input would be greatly appreciated!