From users-return-17013-apmail-jackrabbit-users-archive=jackrabbit.apache.org@jackrabbit.apache.org Fri Feb 11 12:44:54 2011 Return-Path: Delivered-To: apmail-jackrabbit-users-archive@minotaur.apache.org Received: (qmail 92339 invoked from network); 11 Feb 2011 12:44:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 11 Feb 2011 12:44:54 -0000 Received: (qmail 1288 invoked by uid 500); 11 Feb 2011 12:44:53 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 1185 invoked by uid 500); 11 Feb 2011 12:44:50 -0000 Mailing-List: contact users-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@jackrabbit.apache.org Delivered-To: mailing list users@jackrabbit.apache.org Received: (qmail 1165 invoked by uid 99); 11 Feb 2011 12:44:49 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Feb 2011 12:44:49 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [194.172.26.36] (HELO MX2.aeb.de) (194.172.26.36) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Feb 2011 12:44:43 +0000 X-IronPort-AV: E=Sophos;i="4.60,455,1291590000"; d="scan'208,217";a="1884043" Received: from unknown (HELO S-HQMX7.pmbelz.de) ([10.237.5.7]) by MX2I.pmbelz.de with ESMTP; 11 Feb 2011 13:44:20 +0100 Received: from S-HQMX6.pmbelz.de ([fe80::c11d:7ab7:ed94:fb34]) by S-HQMX7.pmbelz.de ([fe80::c4b6:4b67:cd89:2050%15]) with mapi; Fri, 11 Feb 2011 13:44:19 +0100 From: "Cech. Ulrich" To: "users@jackrabbit.apache.org" Date: Fri, 11 Feb 2011 13:44:18 +0100 Subject: Rather easy SQL2-query? Thread-Topic: Rather easy SQL2-query? Thread-Index: AcvJ6WXoWKg6hMS+TrabyQ3lYyJtkw== Message-ID: Accept-Language: de-DE Content-Language: de-DE X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: de-DE Content-Type: multipart/alternative; boundary="_000_B0935AD5B821BB4EB2E7D7ACC5C3633E0B0B12A8B7SHQMX6pmbelzd_" MIME-Version: 1.0 --_000_B0935AD5B821BB4EB2E7D7ACC5C3633E0B0B12A8B7SHQMX6pmbelzd_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hello to all, I am getting stucked on trying to find the SQL2-String for following query: I want to select every node of type "nt:file", which has some parent/up-the= -hierarchy-node with a node-name as "HAUPT" (this parent node has the norma= l "nt:unstructured" node type) My best try is: select f from [nt:unstructured] as x inner join [nt:file] as f on isdescend= antnode(f, x) WHERE NAME([x]) =3D 'HAUPT' But the result is following execption: javax.jcr.query.InvalidQueryException: Query: select f from [nt:unstructured] as x inner join [nt:file] as f on isdescend= antnode(f, x) WHERE(*)NAME([x]) =3D 'HAUPT'; expected: Need to specify the= selector name because the query contains more than one selector. The following tries fail here: x.[NAME([x])] [x].NAME([x]) x.NAME([x]) ... Can someone point me to the right direction? Thanks in advance, Ulrich --_000_B0935AD5B821BB4EB2E7D7ACC5C3633E0B0B12A8B7SHQMX6pmbelzd_--