In article <[EMAIL PROTECTED]>, "Jim McAtee" <[EMAIL PROTECTED]> writes: > In another table like this with month/year fields I once created a > dummy date field that I populated with the date of the first of the > month (1/<month>/<year>), just to facilitate queries like this. Is > there another approach? Can I somehow create that dummy field on the > fly within the query itself?
Sure, something like WHERE concat(yr, '-01-01') + INTERVAL (mn-1) MONTH BETWEEN '2002-01-01' AND '2002-03-01' but you would save yourself that trouble if you'd use DATE with some arbitrary day. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]