If you want to create a CAML Query it is helpful to use a query builder. One tool you are able to use is the CAML Query Builder from U2U. There you can build and see directly what result your query will be. As you can see within the first screenshot it is possible to edit the CAML Query directly in the Editor Mode. In this case we filter all Projectstatus which conatins “ve” and got all “active” and “inactive” Projects. This tool you can use to build complex JAVA Script Solutions as we have used it before in our blog entrie about SPServices Filter DropDown Example.
Link to the tool: http://www.u2u.be/Tools/wincamlquerybuilder/CamlQueryBuilder.aspx
CAML Query Editor Mode
CAML Query Result Mode
..:: I like SharePoint ::..