Jeff, We use a simple function that can be called in any query, like so: SELECT * FROM table WHERE column < first_of_month();
-- Function: public.first_of_month() CREATE FUNCTION public.first_of_month() RETURNS date AS ' DECLARE stamp DATE; BEGIN SELECT INTO stamp CAST(date_trunc(''month'',now())AS DATE); return stamp; END;' LANGUAGE 'plpgsql' STABLE; -- Bill MacArthur Webmaster The DHS Club, Inc. The Best Is Yet To Come! ---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html