Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

SQL2 Query for perticular DAM folder.

Avatar

Level 2

Hi,

PFA.

 

SELECT * FROM [dam:Asset] AS asset WHERE (asset.[jcr:content/metadata/cq:tags] IN ('post-sales')) AND ISDESCENDANTNODE(asset,'/content/dam/marketing-assist/digital-services')

 

This query is working properly.
It gives me nodes from "/content/dam/my-folder/digital-services" path as well as its subfolder nodes.

I want to limit it to a particular folder only; without subfolders.

 

Please suggest.

 

onkarh71407069_2-1612790010904.pngonkarh71407069_3-1612790065101.png

 

 

 

 

 

 

 

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi,

Use below query

SELECT * FROM [dam:Asset] AS asset WHERE (asset.[jcr:content/metadata/cq:tags] IN ('post-sales')) AND ISCHILDNODE(asset,'/content/dam/marketing-assist/digital-services')

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

Hi,

Use below query

SELECT * FROM [dam:Asset] AS asset WHERE (asset.[jcr:content/metadata/cq:tags] IN ('post-sales')) AND ISCHILDNODE(asset,'/content/dam/marketing-assist/digital-services')