Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 18976 invoked from network); 25 Feb 2009 15:10:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 25 Feb 2009 15:10:04 -0000 Received: (qmail 47668 invoked by uid 500); 25 Feb 2009 15:10:03 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 47251 invoked by uid 500); 25 Feb 2009 15:10:03 -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 Received: (qmail 47237 invoked by uid 99); 25 Feb 2009 15:10:02 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Feb 2009 07:10:02 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of george.dma@gmail.com designates 64.233.182.188 as permitted sender) Received: from [64.233.182.188] (HELO nf-out-0910.google.com) (64.233.182.188) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Feb 2009 15:09:56 +0000 Received: by nf-out-0910.google.com with SMTP id c7so22092nfi.15 for ; Wed, 25 Feb 2009 07:09:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=4oxGhIBoVfyIpXdSSZwJXdq7UKhuGzXkctPLe+89ty0=; b=g5txDOm1E+b5z3VCmRO5+kgPU+Nb4h6gt/Bkg/5+xpo3MN/0cr6t4RU8esD46hBUBq a7J1h+46MR26UQAKUWJFeuqBaybF6YAkzVwvSFzN9jA41hCINv8T3w1kacMlv2BYkdNb mISTYSC8KVLcQFy/En5Z0lWuIJRojeGVKaT0g= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=bOp3aTskiYQ7ztRijbU15WOgvCM/oBVpQOfOJmUItb94HuXpzYDKsyJqs2nlV5ENHT iHY75Ps2b467FNGi6/VW5tp0EqoADJA5jeFVMSVw92UcSnMFmk8VT8Am3qTUM+yyXf7E IhfhPPFOQMDDyI9UF0aSOYnmcM7EH14a3bB2I= MIME-Version: 1.0 Received: by 10.220.98.81 with SMTP id p17mr166472vcn.79.1235574574084; Wed, 25 Feb 2009 07:09:34 -0800 (PST) In-Reply-To: <49A55AC5.3050402@sun.com> References: <49A536EE.70808@openbravo.com> <49A5526D.2050109@sun.com> <49A55AC5.3050402@sun.com> Date: Wed, 25 Feb 2009 15:09:34 +0000 Message-ID: Subject: Re: Query issue From: George H To: Derby Discussion Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org You're right. -- George H george.dma@gmail.com On Wed, Feb 25, 2009 at 2:50 PM, Rick Hillegas w= rote: > Hi George, > > I see the query. But I don't see the schema (the ddl used to create the > tables) or the inserts which populate the tables to the point that the bu= g > occurs. > > Thanks, > -Rick > > George H wrote: >> >> He did, it's footnoted at the bottom of his email as a URL and the >> query is pasted at the bottom too. >> We tend to miss things at the bottom of emails :P >> >> -- >> George H >> george.dma@gmail.com >> >> >> >> On Wed, Feb 25, 2009 at 2:15 PM, Rick Hillegas >> wrote: >> >>> >>> Hi Mikel, >>> >>> Could you provide a script which reproduces this problem on Derby? >>> >>> Thanks, >>> -Rick >>> >>> Mikel Irurita wrote: >>> >>>> >>>> Dear, >>>> >>>> I have a problem executing this query [1]: >>>> >>>> It returns the =EF=BB=BFT.ID value duplicated in P.ID, T.ID y C.ID. >>>> All the values are correct. >>>> >>>> Example of the result in Derby: >>>> >>>> id1 2 0 2009-02-24 12:43:49.136 id1 id1 NULL NULL 0 1000006 3.0 37.0 i= d1 >>>> 189.08 >>>> id1 2 0 2009-02-24 12:43:49.136 id1 id1 NULL NULL 1 1000004 4.0 13.0 i= d1 >>>> 189.08 >>>> >>>> >>>> If I executed this query in other database for example (MySQL, ...) it >>>> works fine. >>>> >>>> Example of the expected result: >>>> >>>> id1 2 0 2009-02-24 12:43:49.136 id2 id3 NULL NULL 0 1000006 3.0 37.0 i= d4 >>>> 189.08 >>>> id1 2 0 2009-02-24 12:43:49.136 id2 id3 NULL NULL 1 1000004 4.0 13.0 i= d5 >>>> 189.08 >>>> >>>> Any suggestions? >>>> >>>> Thanks in advance. >>>> >>>> Regards, >>>> Mikel Irurita. >>>> >>>> [1] http://rafb.net/p/LeTm7b34.html >>>> >>>> >>>> >>>> ----------------------------------------------------------------------= --------------- >>>> >>>> SELECT T.ID TI_UUID, T.TICKETID TI_ID, T.TICKETTYPE TI_TYPE, R.DATENEW >>>> TI_DATE, =C2=A0P.ID PEO_ID, >>>> C.ID BP_ID, C.SEARCHKEY BP_SKEY, C.NAME BP_NAME, >>>> L.LINE LINE_ID, L.PRODUCT LINE_PRODUCT, L.UNITS LINE_UNITS, L.PRICE >>>> LINE_PRICE, TAX.ID TAX_ID, >>>> SUM(PAY.TOTAL) PAYMENT_TOTAL >>>> >>>> FROM RECEIPTS R JOIN TICKETS T ON R.ID =3D T.ID JOIN TICKETLINES L ON = T.ID >>>> =3D >>>> L.TICKET >>>> JOIN TAXES TAX ON L.TAXID =3D TAX.ID LEFT OUTER JOIN PEOPLE P ON T.PER= SON >>>> =3D >>>> P.ID >>>> LEFT OUTER JOIN CUSTOMERS C ON T.CUSTOMER =3D C.ID JOIN PAYMENTS PAY O= N >>>> R.ID=3DPAY.RECEIPT >>>> WHERE (T.TICKETTYPE =3D 0 OR T.TICKETTYPE =3D 1) AND T.STATUS =3D 0 >>>> >>>> GROUP BY T.ID, T.TICKETID, T.TICKETTYPE, R.DATENEW, =C2=A0P.ID, >>>> C.ID , C.SEARCHKEY, C.NAME, >>>> L.LINE, L.PRODUCT, L.UNITS, L.PRICE, TAX.ID >>>> >>>> >>>> >>>> ----------------------------------------------------------------------= --------------- >>>> >>> >>> > >