Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.

AEM Sql2 subqury is not working

Avatar

Level 4

Hi,

I am trying to use SQL2 sub-query while I am executing the query getting error. Below is my query and error. Can someone look share whats wrong i am doing here?

#Query

SELECT * FROM [nt:base] WHERE [sling:resourceType] = 'mywebsite/components/content/button' AND [buttonURL] IN(SELECT [jcr:path] FROM [dam:Asset] AS s WHERE CONTAINS(s.*, 'mysearchKeyword') AND [jcr:path] ISDESCENDANTNODE([/content/dam/mywebsite])) AND ISDESCENDANTNODE([/content/mywebsite/dashboard])

#Error

java.text.ParseException: Query: SELECT * FROM [nt:base] WHERE [sling:resourceType] = 'mywebsite/components/content/button' AND [buttonURL] IN(SELECT(*)[jcr:path] FROM [dam:Asset] AS s WHERE CONTAINS(s.*, 'mysearchKeyword') AND [jcr:path] ISDESCENDANTNODE([/content/dam/mywebsite])) AND ISDESCENDANTNODE([/content/mywebsite/dashboard]); expected: static operand

0 Replies