Re: Last Full Three Months?

From: Kenneth Downs <knode.wants.this_at_see.sigblock>
Date: Thu, 02 Jun 2005 07:33:40 -0400
Message-Id: <mh73n2-k2g.ln1_at_pluto.downsfam.net>


Dan wrote:

> Hi,
>
> I have sales line item detail like
>
> invoicedate, custid, ordernum
>
> Is there a way using SQL to only return records for the last full three
> months? For example, if today is 2/4/05, I would want records with
> invoicedate between 11/1/04 and 1/31/05.
>
> TIA,
> Dan

It is as simple as a query with a BETWEEN. The trick is determining the exact date figures. This would be very easy in a client language, and PHP for instance makes it child's play. Do you have the option to form the query in the client language, or are you required to make a stored procedure on the server?

-- 
Kenneth Downs
Secure Data Software, Inc.
(Ken)nneth_at_(Sec)ure(Dat)a(.com)
Received on Thu Jun 02 2005 - 13:33:40 CEST

Original text of this message