http://www.ideseg.com/SharePointCAMLEditorV000.aspx

CAML XML Editor

넘 복잡한 WSS CAML ㅡㅡ;

이걸로 조금은 편해지려나 된장...






MOSS 개발자들에 힘을~!! ㅋㅋ




PS. 요건 다른..


http://www.ideseg.com/SharePointYetAnotherCAMLQueryTool2.aspx

WHERE ((Column1 = "Value1") AND (Column2 = "Value2")) OR ((Column3 = 10)
AND (Column3 <> NULL)) GROUPBY Column1 ORDERBY Column1, Column2 ASC, Column3 DESC

Also, you can use ==  for equal and != for not equal  and && for and, or, || for or (it's a c# goodie)

The CAML result code

<Query>
  <Where>
    <Or>
      <And>
        <Eq>
          <FieldRef Name="Column1" />
          <Value Type="Text">Value1</Value>
        </Eq>
        <Eq>
          <FieldRef Name="Column2" />
          <Value Type="Text">Value2</Value>
        </Eq>
      </And>
      <And>
        <Eq>
          <FieldRef Name="Column3" />
          <Value Type="Integer">10</Value>
        </Eq>
        <IsNotNull>
          <FieldRef Name="Column3" />
        </IsNotNull>
      </And>
    </Or>
  </Where>
  <GroupBy>
    <FieldRef Name="Column1" />
  </GroupBy>
  <OrderBy>
    <FieldRef Name="Column1" />
    <FieldRef Name="Column2" Ascending="True" />
    <FieldRef Name="Column3" Ascending="False" />
  </OrderBy>
</Query>

Also you can add the assembly (IdeSeg.SharePoint.Caml.QueryParse) in your projects

using IdeSeg.SharePoint.Caml.ParseQuery;
 
string query = "where Campo1=10 && campo2=\"Test\" and campo3=#01/01/2007# order Campo3";
try
{
    string xmlQuery = CAMLParser.Query(query);        
}
catch (ParserException ex)
{
    statusError = ex.Message;
}  










 

유사한 주제의 글들을 살펴보세요:

, , ,

Latest Comment

티스토리 툴바