Subject | Re: [ib-support] Calling all SQL Gurus... |
---|---|
Author | Henry FRANQUET |
Post date | 2002-08-23T07:53:31Z |
why not just
and ((H.Yr >= 2001 and (H.mo >=8 or H.Yr > 2001)) and (H.Yr <= 2002 and (H.mo
<=7 or H.Yr < 2002)))
and ((H.Yr >= 2001 and (H.mo >=8 or H.Yr > 2001)) and (H.Yr <= 2002 and (H.mo
<=7 or H.Yr < 2002)))
> > > SELECT
> > > H.CUSTNO, H.CUSTNAME,
> > > SUM ( H.SALESAMT ) AS SALESAMT, SUM ( H.GROSSMARGIN ) AS
> > GROSSMARGIN
> > > FROM CUST_HIST H
> > > WHERE
> > > H.COMPANY = '01' AND DIVISION = '01'
> > > and ((H.Yr >= 2001 and H.mo >=8) and (H.Yr <= 2002 and H.mo <=7))
> >