With some DB's moving your criteria from the WHERE clause to the HAVING clause will take care of it since HAVING is evaluated after the results have been calculated... sometimes...
-- Jay -----Original Message----- From: [EMAIL PROTECTED] [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 13 October 2007 00:01 To: CF-Talk Subject: SQL Concat Issue I am probably being dense or showing my ignorance here, but I have a legacy database that I need to run a query on like the following. Can anyone tell me how I can achieve the following. Right now I am getting an error that PubYear is not a valid column. Thank you! SELECT AdINFO_Publication, ADINFO_PUBLICATIONDATE_YEAR+ '-' + ADINFO_PUBLICATIONDATE_MONTH + '-01' AS PubYear FROM crAdInfo AND PubYear BETWEEN #dateformat(startdate,"yyyy-mm-dd")# AND #dateformat(enddate,"yyyy-mm-dd")# Any Help is appreciated. Thanks! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Get the answers you are looking for on the ColdFusion Labs Forum direct from active programmers and developers. http://www.adobe.com/cfusion/webforums/forum/categories.cfm?forumid-72&catid=648 Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:291081 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4