Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 10508200D62 for ; Sat, 16 Dec 2017 18:13:01 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 0E7F6160C11; Sat, 16 Dec 2017 17:13:01 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 74FEC160C01 for ; Sat, 16 Dec 2017 18:13:00 +0100 (CET) Received: (qmail 55273 invoked by uid 500); 16 Dec 2017 17:12:59 -0000 Mailing-List: contact dev-help@chemistry.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@chemistry.apache.org Delivered-To: mailing list dev@chemistry.apache.org Received: (qmail 55261 invoked by uid 99); 16 Dec 2017 17:12:59 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 16 Dec 2017 17:12:59 +0000 Received: from [192.168.178.42] (ip4d15fe49.dynamic.kabel-deutschland.de [77.21.254.73]) by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org) with ESMTPSA id C58A21A0158; Sat, 16 Dec 2017 17:12:58 +0000 (UTC) Subject: Re: Query latest document To: dev@chemistry.apache.org, "krzysztoffzielinski@gmail.com" References: From: =?UTF-8?Q?Florian_M=c3=bcller?= Message-ID: <147cdd4f-e0af-ab07-43ba-b494a581e7eb@apache.org> Date: Sat, 16 Dec 2017 18:12:54 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit archived-at: Sat, 16 Dec 2017 17:13:01 -0000 Sure there is. Use paging. Set the page size to one and fetch the first page. - Florian > Thanks a lot. > > So there is no way to limit to only one result returned? > > On 2017-12-15 04:12, Antony Joseph Kitherian Xavier wrote: >> You may also use the following if you want to fetch latest documents by >> specific date; >> >> SELECT * FROM cmis:document WHERE cmis:lastModificationDate > TIMESTAMP >> '2017-11-20T12:00:00.000Z' >> >> On Fri, Dec 15, 2017 at 1:49 AM, Florian Müller wrote: >> >>> Are you looking for this: >>> >>> SELECT cmis:objectId,cmis:lastModificationDate FROM cmis:document ORDER >>> BY cmis:lastModificationDate DESC >>> >>> - Florian >>> >>> >>> >>> Hello All >>>> >>>> Is there a way to query the latest document using CMIS queries? >>>> e.g. max(modified) ?? or to specify WHERE clause saying latest date??? >>>> >>>> Thanks >>>> Krzysztof >>>> >>> >> >> >> -- >> Antony Joseph Kitherian .X >> Founder & CEO >> Entoss Technologies Pte Ltd, Singapore >> www.entosstech.com >>