all things Sitecore related

Sitecore Rocks Query Analyzer handy queries – Part 2

Hi there,

Two weeks ago I wrote a blogpost on Sitecore Rock’s Query Analyzer (http://newguidnet/sitecore/2012/sitecore-rocks-query-analyzer-handy-queries/). Tonight I have some more queries that could come in handy!

Get all the items from the MASTER database that have configured an assembly name in it:

use master;
select * from /sitecore//*[contains(@Assembly, ”)]

Get all the items from the CORE database that have configured an assembly name in it:

use core;
select * from /sitecore//*[contains(@Assembly, ”)]

By using a specific database, Sitecore Rock’s Query analyzer automatically fires the query on that database.

Getting all the items that were updated after a certain date:

select * from /sitecore/content//*[@__updated > ‘20121001T00:00:00’] order by Path

Or select fields and define them as a certain name:

select @@name as Name, @@id as Id, @@templatename as TemplateName, @@path as Path from /sitecore//*[@__Updated >= ‘20121001T000000’] order by Path asc

This week I noticed that there was a question in the comments on John West blog ( that John already answered but wasn’t sure about, cause you can’t find much info on it.. The question was to use Sitecore Rocks Query Analyzer in a certain language.

I did some investigation and since the release of Sitecore Rocks 0.7.7 ( the Sitecore Rocks Query Analyzer supports the new keyword ‘Set Language’. It’s probably an unaware feature, since it’s not documented when you use help set;

Here’s an example to set the language to Dutch:

set language=’nl-nl’

I needed it this week while working for Iquality ( and looking for some dictionary items that weren’t translated yet in the Dutch language, it took me just 5 minutes! 😉

set language=’nl-nl’
select @@name as Name, @@Path as Path,@#Value Text#, @#Value RichText# from /sitecore/content/Global/Dictionary/Sublayouts//*[@@templatename = ‘Dictionary Item’] order by Path

Remember ofcourse to set it back to

set language=’en’

when executing other queries if you need to.

Enjoy your Sitecore Rocks queries!



About the Author

About the Author: I'm a Freelance and passionate Sitecore Developer living in The Netherlands. Running my own company Kayee Internet & Software Oplossingen. I am specialized since 2008 in Sitecore and Umbraco implementations. Sitecore MVP since 2011. Founder and member of the Dutch Sitecore User Group. You can follow me on twitter: @kayeeNL. My website: .


If you enjoyed this article, subscribe now to receive more just like it.

There Are 15 Brilliant Comments

Trackback URL | Comments RSS Feed

Sites That Link to this Post

  1. Marc Duiker (@marcduiker) | December 14, 2012
  2. Ronald Nieuwenhuis (@rhlnieuwenhuis) | December 14, 2012
  3. Sitecore New Zealand (@sitecorenz) | December 15, 2012
  4. Robbert Hock (@kayeeNL) | December 17, 2012
  5. Sitecore Nederland (@Sitecore_nl) | December 17, 2012
  6. @BrruuD | December 17, 2012
  7. Suresh Devanan (@surdev) | December 17, 2012
  8. Sitecore New Zealand (@sitecorenz) | December 17, 2012
  9. Sitecore (@Sitecore) | January 23, 2013
  10. Kevin Obee (@KevinObee) | January 23, 2013
  11. Sean Holmesby (@seanholmesby) | January 23, 2013
  12. Robbert Hock (@kayeeNL) | January 23, 2013
  13. Sitecore New Zealand (@sitecorenz) | January 23, 2013
  14. @sewell_jason | January 24, 2013
  15. @SitecoreRocks | January 25, 2013

Post a Comment

Your email address will not be published. Required fields are marked *