I think you mean this.
select wx_begdate, wx_endate from table1 where today between wx_begdate and wx_enddate;
That should work if all your begin and endates are different.
jim
________________________________
From: informix-list-bounces (AT) iiug (DOT) org on behalf of jared.hanks (AT) gmail (DOT) com
Sent: Fri 7/13/2007 7:14 PM
To: informix-list (AT) iiug (DOT) org
Subject: Return record where date is between fields
Hello,
I'm not exactly sure how to search on this, but I'm guessing this has
been done before and is quite easy. I just am not sure how to figure
it out.
I have a table that has week, year, and date information. It is
structured so I have a week number, year number, beginning date
(Sundays), and ending date (Saturdays) and these are only by weeks.
For example this is what it looks like:
wx_year wx_week wx_begdate wx_enddate wx_month
2007 1 02/04/2007 02/10/2007 1
2007 2 02/11/2007 02/17/2007 1
2007 3 02/18/2007 02/24/2007 1
2007 4 02/25/2007 03/03/2007 1
2007 5 03/04/2007 03/10/2007 2
2007 6 03/11/2007 03/17/2007 2
2007 7 03/18/2007 03/24/2007 2
2007 8 03/25/2007 03/31/2007 2
2007 9 04/01/2007 04/07/2007 2
2007 10 04/08/2007 04/14/2007 3
2007 11 04/15/2007 04/21/2007 3
and so on....
I would like to get the begging and ending date for today, but since
it's in the middle of the week I'm not exactly sure how I would do
this.
Any help is appreciated.
Thanks,
Jared
_______________________________________________
Informix-list mailing list
Informix-list (AT) iiug (DOT) org
http://www.iiug.org/mailman/listinfo/informix-list