How to accomplish a union in JCR-SQL

Greetings,

I have a slot that uses sysAutoSlotContentFinder. My current query is
SELECT rx:sys_contentid, rx:sys_folderid FROM rx:Generic WHERE jcr:path like :folder_path

I’d like to add items of another content type to the query. If this were JCR-SQL2, I think I could use the union operator, something like:
SELECT rx:sys_contentid, rx:sys_folderid FROM rx:Generic WHERE jcr:path like :folder_path UNION SELECT rx:sys_contentid, rx:sys_folderid FROM rx:Homepage WHERE jcr:path like :folder_path

Is there a way to achieve a similar result with the version of JCR-SQL that is supported by Percussion?

Thanks!

You don’t need UNION in your scenario, you simply need a comma.

SELECT rx:sys_contentid, rx:sys_folderid FROM rx:Generic, rx:Homepage WHERE jcr:path like :folder_path

That will bring you back both the Generic items as well as the Homepage items that live under :folder_path.

Hope that helps.