Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 94564 invoked from network); 7 Feb 2010 02:10:50 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 7 Feb 2010 02:10:50 -0000 Received: (qmail 74810 invoked by uid 500); 7 Feb 2010 02:10:49 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 74684 invoked by uid 500); 7 Feb 2010 02:10:49 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 74669 invoked by uid 99); 7 Feb 2010 02:10:49 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 07 Feb 2010 02:10:49 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 07 Feb 2010 02:10:48 +0000 Received: from brutus.apache.org (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 32B9A29A0013 for ; Sat, 6 Feb 2010 18:10:28 -0800 (PST) Message-ID: <855364963.102971265508628206.JavaMail.jira@brutus.apache.org> Date: Sun, 7 Feb 2010 02:10:28 +0000 (UTC) From: "Rick Hillegas (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Updated: (DERBY-4513) Forbid NEXT VALUE FOR clause in certain contexts In-Reply-To: <348044516.187021263321354557.JavaMail.jira@brutus.apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/DERBY-4513?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Rick Hillegas updated DERBY-4513: --------------------------------- Issue & fix info: [Patch Available] > Forbid NEXT VALUE FOR clause in certain contexts > ------------------------------------------------ > > Key: DERBY-4513 > URL: https://issues.apache.org/jira/browse/DERBY-4513 > Project: Derby > Issue Type: Bug > Components: SQL > Affects Versions: 10.6.0.0 > Reporter: Rick Hillegas > Assignee: Rick Hillegas > Attachments: derby-4513_01-aa-illegalContexts.diff > > > This is part of the work needed to implement ANSI/ISO sequences. The functional spec attached to DERBY-712 lists various situations in which the NEXT VALUE FOR clause is illegal. These include: > * CASE expression > * WHERE clause > * ORDER BY clause > * AGGREGATE expression > * WINDOW function > * DISTINCT select list > In addition, I propose that we make it illegal for a statement to have more than one NEXT VALUE FOR clause on the same sequence generator. This is a tighter restriction than the ANSI/ISO standard calls for. The standard requires that if two columns in a row are populated by NEXT VALUE FOR clauses on the same sequence, then the values should be the same. I don't feel confident that I could track down all of the cases which could give rise to this situation--so I propose to limit the number of NEXT VALUE FOR clauses on a given sequence generator to just 1. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.