A class of the Microsoft.SharePoint namespace, SPSiteDataQuery represents a query that can be performed across multiple lists in multiple Web sites in the same Web site collection.

learn more… | top users | synonyms

10
votes
1answer
3k views

Client Object Model Equivalent of SPSiteDataQuery?

I'm looking for an equivalent to the SPSiteDataQuery functionality in the Client Object Model (COM). The CamlQuery can be used with an instance of List to execute SPQuery level of aggregation, but is ...
6
votes
2answers
8k views

CAML Query with Date Range

I'm writing an SPSiteDataQuery and I am having issues with the Query property. I need to return all results where the Record_x0020_Yr_x0020_End_x0020_Date is between 12/31 of the current year and 90 ...
5
votes
2answers
4k views

SPSiteDataQuery vs. Recursive SPWeb.Lists Performance

I'm looking for the best performing means of querying for site data within a site collection. I need to query for all of the lists in either a particular SPWeb, or a set of SPWeb's, that contain a ...
5
votes
2answers
2k views

Is it possible to filter SPSiteDataQuery results by site?

I'm using SPSiteDataQuery to query several lists in different sites. Unfortunately, I don't want the data from all of these sites; I have a list of ones to include and exclude. So far I've seen ...
5
votes
1answer
606 views

SPSiteDataQuery filtering on enterprise keywords field problem

I'm using SPSiteDataQuery class to query pages for particular content type and tag across the site collection. The custom content type is inherited from Page content type and contains 'Summary' field ...
3
votes
2answers
1k views

CAML: Possible to query non existing field?

I'm using SPSiteDataQuery to fetch list contents from 2 different lists. List A) has the fields CustomField and Title List B) has only Title Is it possible to build a (filter) query with ...
3
votes
2answers
259 views

Why am I NOT receiving an SPSiteDataQuery throttled exception?

I am unsuccessfully attempting to cause an SPQueryThrottledException locally in order to debug a problem a customer is having. I'm using SPSiteDataQuery to query several sites which contain 4000 to ...
3
votes
4answers
3k views

Web.GetSiteData(query) throws SPException

I am running the following SPSiteDataQuery. The query was working, but only started throwing the SPException after I added an already existing managed metadata site column to the Documents library. ...
3
votes
3answers
425 views

SPSiteDataQuery and Look-up column

I have a requirement to iterate through multiple task lists under SharePoint sites and sub-sites. I am using SPSiteDataQuery to achieve this. I have an issue with fetching the data when the column is ...
3
votes
1answer
690 views

Get last major published version of items returned as DataRow (from SPSiteDataQuery)

Does anyone know the solution for this? If I'm querying items by SPSiteDataQuery I receive a DataTable with DataRow objects. I could fetch the current version of an item and check if it ends with ...
2
votes
2answers
68 views

Where can I find a list of fields that can be retrieved when running a sharepoint query?

An SPSiteDataQuery. So far I have: ... query.ViewFields = @"<FieldRef Name=""Title"" /><FieldRef Name=""Author"" />"; ... I just happened to get these two FieldRef's right (purely ...
2
votes
2answers
278 views

Unwanted characters appearing before author in search results

When running my SPSiteDataQuery (code below), I appear to be getting 1;# before the actual Author Name. Can anyone point me in the right direction towards an explanation to this please? ...
2
votes
1answer
777 views

SPSiteDataQuery throwing exception while setting it's Query property

I am querying multiple task lists in a SharePoint site. I can retrieve the results until I set the Query property and specify the OrderBy clause. The detailed exception and code is pasted below. ...
2
votes
1answer
506 views

Web Service for SPSiteDataQuery

Is there a web service(WSDL) to access spsitedataquery functions?. I see web services for sitedata, lists, web and site but there is no spsitedata*query*. I am interested in getting the list of Lists ...
2
votes
1answer
133 views

Help Return Lists With With No List Items

This is my first time posting and I'm looking for some help, so hopefully someone has an answer. I used the search, but didn't find anything. I created a custom list definition, and content type ...
2
votes
2answers
756 views

Incorrect values when querying multiple lists with SPSiteDataQuery

I am having some problems with the values getting returned for calculated and url fields when I query multiple lists with SPSiteDataQuery. The values for these fields are no longer returned in the ...
1
vote
4answers
2k views

SPSiteDataQuery keeps throwing throttle exception

I have a SPSiteDataQuery that returns a result from 6 lists. The lists together contain like 200000 items. The result for my query is like 100 items (only today's items). But no matter what I do, I ...
1
vote
2answers
288 views

How can I get the correct SPFieldUserValue to use SPSiteDataQuery to aggregate tasks for a certain user?

I'm trying to gather all the tasks of a certain content type for a certain user. To accomplish this I'm using a SPSiteDataQuery which looks like this: string where = String.Format(@"<Where> ...
1
vote
1answer
65 views

Is there any benefit of using multiple lists to store documents versus a single library in large lists?

Background: We are migrating a legacy system into Sharepoint and will look to migrate around 300 000 documents. There is some metadata which inherently diferentiates the documents from eachother. ...
1
vote
2answers
951 views

CrossListQueryInfo\SPSiteDataQuery how to skip items with specific WebId?

Customer wants to see 10 news items from all webs on front page. Also customer wants to specify some news that we should skip. I am trying to do next thing: var id =1; <Neq><FieldRef ...
1
vote
2answers
406 views

Best way to get all subsites

I want to create a list of all subsites (all levels), and some details about each of them. The simplest way is to do a recursive function, but I have many subsite (about 600) and I want a more ...
1
vote
1answer
2k views

filter items by Site name and List Name using SPSiteDataQuery

I am listing files from multiple folders using the below code: SPSiteDataQuery q = new SPSiteDataQuery(); q.Lists = "<Lists BaseType='1'/>"; q.Query = ...
1
vote
0answers
82 views

SP2007 SPSiteDataQuery - Exclude user permissions from a specific group

We have a site (SP2007) with approx 1000 second-level sub-sites. We would like all users to have read access to all of the lists in the sub-sites (inherited). In addition, if the user is a member of ...
1
vote
0answers
329 views

SPSiteDataQuery for Documents using caml query

I am tring to query an entire site collection for all the documents where a certain field is equal to something. For example where LoanCategory = Insurance. I am trying to do this using an ...
1
vote
0answers
192 views

SPSiteDataQuery without subfolder items?

I'm trying to use the SPSiteDataQuery to return the contents of several lists across a site collection. The problem I'm having, though, is that while there are only a few documents at the root level ...
1
vote
1answer
305 views

List item field value has ID and # prepended

I want to display a list of items with name and modified time, like so: SPWeb thisWeb = SPContext.Current.Web; SPWebCollection webs = thisWeb.Webs; SPSiteDataQuery query = new ...
0
votes
3answers
1k views

How to to add a Content Query WebPart programatically and use a SPSIteDataquery?

This is the current scenario. I have a central site called: XXX. I have many subsites called with the year name: 2012, 2011, 2010, etc. In the central site I have a list called Beneficiaries. In ...
0
votes
3answers
326 views

SharePoint Data Control to show Custom Data Source

I am building a custom visual webpart where I want to show all the calendar events across a site using SPSiteDataQuery. I know I can use asp.net repeater or grid view to show the data but I was ...
0
votes
1answer
335 views

PublishingStartDate empty even though the page is published

I've been through the typical publish/approve process and have, seemingly, successfully published a page (I've checked it's approval status in the manage content and structure section of the site ...
0
votes
2answers
703 views

FullTextSearch: SPSiteDataQuery on each request vs. caching data and filter in code

I'm implementing a full text search on list contents. Is it more efficient to fire a SPSiteDataQuery on every request with a dynamically built CAML-Query, to filter the items? Or is it better to ...
0
votes
2answers
2k views

List all Pages Libraries using PowerShell and SPSiteDataQuery?

I use foreach in my scripting to make sure I get every web in every site in a specific webapp to, in this case, list (and eventually update) all Pages libraries in the SiteCollection. I've been ...
0
votes
1answer
662 views

property similar to SPQuery listitemcollectionposition for spsitedataquery

I am using SPSiteDataQuery to get all matched items from all lists in site collection. Results set is really large, so I want to limit the results to 1000 or 10K, process these items and then iterate ...
0
votes
1answer
671 views

SharePoint Object Model: how to query ONLY last major version of data from Publishing Page?

I came into a situation where I wanted to use SharePoint Object Model SPSiteDataQuery to query data from Publishing Page. However, I dont want the data query based on the permission on current login ...
0
votes
1answer
318 views

Using SPSiteDataQuery and only getting Items which are searchable

Is there a possibility to get only the items from documentlibrarys where the documentlibrary is searchable. I think the property on the splist is nocrawl. I found a link where is written that there ...
0
votes
0answers
17 views

Security Trimming of SPSiteData Query

I have a web application with more than 50 site collections and multiple sub sites within each such site collection. However, certain users does have access to sub sites but have access to list within ...