🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.interbase.sql
Article #104

Re: Too slow... can't think of a faster way.

#104
From: Frederic Gelinas
Date: Tue, 03 Jun 2008 14:41
15 lines
1370 bytes
Frederic Gelinas wrote:

> Select sum(amount) from ARITEM a  left outer join ARTRANSACTION art on
> art.ID=a.ARTRANSACTIONID
>   where a.client=:aClient and a.customer=:aCustomer
>   and ((a.SCANDATE <= :aDate)
>   and (a.ARTRANSACTIONID is null or art.trandate > :aDate))

That query is not working.  It is not counting any records where
ARITEM.ARTRANSACTIONID is null.  The left outer join automatically
rejects those records.

I'm back to square 1.

-- 
Technical Details
Message-ID: <4845581a$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news1.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nac.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <48455030@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 114a0e,a4b1f4361f20c519
X-Google-Attributes: gid114a0e,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Frederic Gelinas" <frederic_gelinas@hotmail.com>
Subject: Re: Too slow... can't think of a faster way.
Newsgroups: borland.public.interbase.sql
References: <48455030@newsgroups.borland.com>
User-Agent: XanaNews/1.18.1.6
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
NNTP-Posting-Host: 74.12.225.203
Message-ID: <4845581a$1@newsgroups.borland.com>
Date: 3 Jun 2008 07:41:30 -0700
X-Trace: newsgroups.borland.com 1212504090 74.12.225.203 (3 Jun 2008 07:41:30 -0700)
Lines: 16
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news1.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nac.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
X-Original-Bytes: 1188