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
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

SQL2 Query for perticular DAM folder.

onkarh71407069
Level 2
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

 

 

 

 

 

 

 

Assets SQL2
1 Accepted Solution
Arun_Patidar
Correct answer by
Community Advisor
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
Arun_Patidar
Correct answer by
Community Advisor
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