From derby-user-return-13567-apmail-db-derby-user-archive=db.apache.org@db.apache.org Thu May 5 07:43:08 2011 Return-Path: X-Original-To: apmail-db-derby-user-archive@www.apache.org Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 17765294A for ; Thu, 5 May 2011 07:43:08 +0000 (UTC) Received: (qmail 18609 invoked by uid 500); 5 May 2011 07:43:07 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 18455 invoked by uid 500); 5 May 2011 07:43:05 -0000 Mailing-List: contact derby-user-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Reply-To: "Derby Discussion" Delivered-To: mailing list derby-user@db.apache.org Delivered-To: moderator for derby-user@db.apache.org Received: (qmail 44293 invoked by uid 99); 4 May 2011 19:13:00 -0000 X-ASF-Spam-Status: No, hits=-0.1 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_MED,SPF_PASS,UNPARSEABLE_RELAY X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) From: Lance Andersen - Oracle Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: multipart/alternative; boundary=Apple-Mail-220--188373531 Subject: Re: Date manipulation in Derby Date: Wed, 4 May 2011 15:12:20 -0400 In-Reply-To: To: Derby Discussion References: <4DBFF91B.5080200@oracle.com> Message-Id: X-Mailer: Apple Mail (2.1084) X-Source-IP: acsinet21.oracle.com [141.146.126.237] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090201.4DC1A51D.0072:SCFMA922111,ss=1,fgs=0 X-Virus-Checked: Checked by ClamAV on apache.org --Apple-Mail-220--188373531 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Few databases support intervals. We have discussed adding interval support to JDBC and it will probably = happen via JSR 310. Best, Lance On May 4, 2011, at 3:01 PM, Knut Anders Hatlen wrote: > dag.wanvik@oracle.com (Dag H. Wanvik) writes: >=20 >> Rick Hillegas writes: >>=20 >>> I don't see an existing JIRA for this issue. Feel free to log one. >>=20 >> Rick, do you know if there is a standard way of doing this (beyond = the >> JDBC escape function)? I didn't find anything in the standard. It = could >> be that this is one of those things that are not standardized and the >> presence of the JDBC escape is there to cover for vendors differing >> implementations of this. If so, we would be hestitant to add this = unless >> most major vendors agreed on this syntax. >=20 > Hi Dag, >=20 > SQL:2003, part 2, has a section 4.6.4 Operations involving datetimes = and > intervals. If my understanding is correct, databases that support > intervals would allow you to write things like: >=20 > VALUES TIMESTAMP('2010-12-31 23:59:59') + INTERVAL '1' DAY >=20 > --=20 > Knut Anders Lance Andersen| Principal Member of Technical Staff | +1.781.442.2037 Oracle Java Engineering=20 1 Network Drive=20 Burlington, MA 01803 Lance.Andersen@oracle.com --Apple-Mail-220--188373531 Content-Type: multipart/related; type="text/html"; boundary=Apple-Mail-221--188373531 --Apple-Mail-221--188373531 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii Few = databases support intervals.

We have discussed adding = interval support to JDBC and it will probably happen via JSR = 310.

Best,
Lance
On May = 4, 2011, at 3:01 PM, Knut Anders Hatlen wrote:

dag.wanvik@oracle.com (Dag H. = Wanvik) writes:

Rick Hillegas <rick.hillegas@oracle.com> = writes:

I don't see an existing JIRA for this issue. Feel free to = log one.

Rick, do you = know if there is a standard way of doing this (beyond = the
JDBC escape function)? I = didn't find anything in the standard. It = could
be that this is one of = those things that are not standardized and = the
presence of the JDBC = escape is there to cover for vendors = differing
implementations of = this. If so, we would be hestitant to add this = unless
most major vendors = agreed on this syntax.

Hi Dag,

SQL:2003, part = 2, has a section 4.6.4 Operations involving datetimes and
intervals. = If my understanding is correct, databases that support
intervals = would allow you to write things like:

 VALUES = TIMESTAMP('2010-12-31 23:59:59') + INTERVAL '1' DAY

--
Knut = Anders

=

<= /span>
Lance Andersen| Principal Member of Technical Staff | = +1.781.442.2037
Oracle Java = Engineering 
1 Network Drive 
Burlington, MA 01803
Lance.Andersen@oracle.com

= --Apple-Mail-221--188373531 Content-Transfer-Encoding: base64 Content-Disposition: inline; filename=oracle_sig_logo.gif Content-Type: image/gif; name="oracle_sig_logo.gif" Content-Id: R0lGODlhcgAaAMQAAP8QEP/w8P/Q0P/g4P8wMP9gYP8gIP+goP9QUP+QkP+wsP9wcP+AgP9AQP/A wP8AAP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAAA AAAALAAAAAByABoAAAX/ICSOZGmeaKqubOu+cCzPdC0GCqPvvBKUDp5wp1gFdIPVIDfcOQa6A8yR aO4gweQoUHh4v2Bw4SdihM9egyBF8ALIpkEXDR44vA2XwkD/IgYGAAZbbX1nBGRmhl8AWiUJYicC AIsPDFh4LXOGjQ4NAAhrEIUPBQcOqKmoB5sEZV4JqqoHhQVxlGAOJQG4AAunsqg/dw95KwdfBgzB qKIEBMaQDwCiKpOwEIq6KANuJg14igZwEHPULMTGKbxetjF8D1ItxK7aKl8lCl8DAfALW1+2rUi3 QtqgGN2mwYCXzYvAON624LoEQZ9DEfRcEFSBIE2DjyBDfnyIqRgMcA8a/z5AZQWXOxEdHxwUgfIg sX/zMqlAWclVCQFefLpAqdJBAFJn3owgtpJEQkslEWjUmYLnomokcDlS4s0eFzQNqvXDEyzmAwFP yaXYmGJBuxlzELWIacueiE0AFGyF4HbaNTquUEpFRxUFUC9YXQzARYAkEJSNipKQ9kDu0i9SKKNZ 9iXswMIoYgI4oJYFskpgzkkmcdrviELqmPVt1HpRAaaLqCE1lBgjvEpqRtgl8Tevygd7TcCuiKvP m8OVEkAIYLYPThSsRIpEQJr1x94QBIT09FH6QJC6AiRAoB1kEb7tRb4MvyB+AwSlbejfz7+///8A BijggAQWaOCBCCao4A+CDDbo4IMQRijhhBQKGAIAOw== --Apple-Mail-221--188373531-- --Apple-Mail-220--188373531--