Date Comparison when you only have the month and the year
- From: "Jeff Grippe" <jeff@xxxxxxxxx>
- Date: Tue, 19 May 2009 11:35:56 -0400
Hi Everyone,
Thanks for the help.
I have a table with monthly data. Two of the fields are:
Month n(2,0)
Year n(4,0)
There is also an amount field
Amount n(11,2)
I have been asked to query this table based on From and Thru dates and I
don't seem to be able to get the syntax correct
The following expressions in the WHERE clause seem to be causing the problem
DATE(Year, Month, 1) >= TheFromDate AND DATE(Year, Month, 1) <= TheThruDate
What would be the correct way to code this in SQL given that my table has
Month and Year and my criteria for From and Thru are dates?
Thanks,
Jeff
.
- Follow-Ups:
- Re: Date Comparison when you only have the month and the year
- From: Stefan Wuebbe
- Re: Date Comparison when you only have the month and the year
- From: Jeff Grippe
- Re: Date Comparison when you only have the month and the year
- Prev by Date: Re: VFP Updates?
- Next by Date: Re: VFP Updates?
- Previous by thread: IIF in select statement?
- Next by thread: Re: Date Comparison when you only have the month and the year
- Index(es):