Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I write this code, and I try to group by Ascending or Descending.

<Query> <Where> <Neq> <FieldRef Name='Nazwisko' /> <Value Type='Note'>" "</Value> </Neq> </Where> <OrderBy> <FieldRef Name='Nazwisko' Ascending='False' /> </OrderBy> </Query>

But it no work. How Could I manage to group elements?

share|improve this question
    
Try removing the <Query> tag. –  TZHX Dec 12 '12 at 13:09

1 Answer 1

up vote 1 down vote accepted

If your query is correct and you use these lines of code

SPQuery query = new SPQuery;
query.Query = "your query string"

You should remove <Query> tag from your sting

<Where><Neq><FieldRef Name='Nazwisko' /><Value Type='Note'>" "</Value></Neq></Where> <OrderBy><FieldRef Name='Nazwisko' Ascending='False' /></OrderBy>

Also I'm not sure about note field, did you try to test your query in U2U Caml Query Builder?

share|improve this answer
    
I made this query there and its no work on U2U Caml Query Builder –  Grzegorz Z Dec 12 '12 at 13:24
1  
remove <Query> from your query –  Alexander Dec 12 '12 at 13:31
    
Okey now its worked fine :) –  Grzegorz Z Dec 12 '12 at 13:39

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.