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

How to find particular image log exists on what pages using SQL2 query?

Avatar

Avatar
Ignite 1
Level 1
touseefk2181136
Level 1

Like

1 like

Total Posts

1 post

Correct Reply

0 solutions
Top badges earned
Ignite 1
Boost 1
View profile

Avatar
Ignite 1
Level 1
touseefk2181136
Level 1

Like

1 like

Total Posts

1 post

Correct Reply

0 solutions
Top badges earned
Ignite 1
Boost 1
View profile
touseefk2181136
Level 1

18-08-2020

I have a requirement where I need a list of pages, just to know that a particular image logo exists on what pages. 

As highlighted in the following image, I need all the pages with property imageReference set as "company-horiz-blk.png"

 

 

touseefk2181136_0-1597772997418.png

 

 

So I need to write a SQL2 query regarding this.

Any help would be appreciated.

 

Replies

Avatar

Avatar
Validate 1
MVP
Nikhil-Kumar
MVP

Likes

240 likes

Total Posts

253 posts

Correct Reply

38 solutions
Top badges earned
Validate 1
Ignite 3
Ignite 1
Give Back 5
Give Back 3
View profile

Avatar
Validate 1
MVP
Nikhil-Kumar
MVP

Likes

240 likes

Total Posts

253 posts

Correct Reply

38 solutions
Top badges earned
Validate 1
Ignite 3
Ignite 1
Give Back 5
Give Back 3
View profile
Nikhil-Kumar
MVP

18-08-2020

@touseefk2181136  
Try giving the path of the content structure in the Path and the string or the reference you want to search in the Text below and Generate and Execute the query. It should display the results.

link.PNG

Let me know if this doesn't works!!

Avatar

Avatar
Establish
MVP
Nupur_Jain
MVP

Likes

165 likes

Total Posts

186 posts

Correct Reply

76 solutions
Top badges earned
Establish
Ignite 1
Give Back 5
Give Back 3
Give Back 25
View profile

Avatar
Establish
MVP
Nupur_Jain
MVP

Likes

165 likes

Total Posts

186 posts

Correct Reply

76 solutions
Top badges earned
Establish
Ignite 1
Give Back 5
Give Back 3
Give Back 25
View profile
Nupur_Jain
MVP

18-08-2020

Hi @touseefk2181136 

 

SQ2 to search for image References with particular image can be searched with 


SELECT * FROM [nt:unstructured] AS node WHERE ISDESCENDANTNODE (node, '/content/we-retail') AND node.[imageReference] = '/content/dam/we-retail/en/activities/climbing/indoor-practicing.jpg'

 

The above query will search for all the paths where imageReference is present.

I would say if you want to search for logo imageReference specifically, you can also add sling:resourceType of the logo as well in the search like

 

SELECT * FROM [nt:unstructured] AS node WHERE ISDESCENDANTNODE (node, '/content/we-retail') AND node.[imageReference] = '/content/dam/we-retail/en/activities/climbing/indoor-practicing.jpg' AND node.[sling:resourceType] = 'foundation/components/image'

 

Hope it helps!

Thanks!

Nupur