Hi. Using SQL (IBM DB2 vers 7). Trying to take the following where statement and automate it. Currently the user has to change the date in the query every month. Where effective_date<'2005-03-01' Next month it'll have to be changed to <'2005-04-01'. So in the exammple where effective_date <'2005-03-01', would like to have sql automatically calculate so that even if the query is executed on March 15th, the records returned would still have effective dates of ONLY up to 2/28/2005 (anything less than 3/1/2005).
any ideas? Started playing with : year(effect_date)<=year(current date) and month(effect_date)<month(current date) and day(effect_date) -> but this is where I get stumped. Thanks! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Purchase Studio MX with Flash Pro from House of Fusion, a Macromedia Authorized Affiliate and support the CF community. http://www.houseoffusion.com/banners/view.cfm?bannerid=51 Message: http://www.houseoffusion.com/lists.cfm/link=i:6:2215 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/6 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:6 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.6 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
