The problem lies in the order that things are being executed. The DateDiff function is being processed by CF before it goes to the database. So CF is looking for a variable called MEB.MembShpDate and ORD.ProcessedDate not the database columns!
You want to use the database function for dateDiff not CF's in this case. Not sure what database you are using but I think in SQLServer the function is called DateDiff. HTH Sam On 8/16/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I have a query where I'm performing an inner join and the cfm page is telling > me ... > > MembShpDate is an existiing column in the MemberDetails table and it's a valid > datetime datatype. Any ideas? Full cfquery is after error message. > > The following information is meant for the website developer for debugging > purposes. > > Error Occurred While Processing Request > Element MEMBSHPDATE is undefined in MEB. > > > The error occurred in > C:\CFusionMX7\wwwroot\PipeLine\Pipe_SchoolCoun\rm\reportMemberReg.cfm: line 31 > > 29 : <cfquery name="getReg" datasource="#app.ds#" timeout="120"> > 30 : SELECT * FROM Orders ORD INNER JOIN MemberDetails MEB, > MEB.MembShpDate, ON ORD.UserID = MEB.MemberAutoID > 31 : WHERE #DateDiff ('d', MEB.MembShpDate, ORD.ProcessedDate)#" = 0 > 32 : AND ORD.Deleted = 0 > 33 : AND (ORD.PaymentInfo = 'Membership Only' OR ORD.PaymentInfo = 'New > Membership and Registration') > > > > > > here is the full query. > <cfquery name="getReg" datasource="#app.ds#" timeout="120"> > SELECT * FROM Orders ORD INNER JOIN MemberDetails MEB ON ORD.UserID = > MEB.MemberAutoID > WHERE #DateDiff ('d', MEB.MembShpDate, ORD.ProcessedDate)#" = 0 > AND ORD.Deleted = 0 > AND (ORD.PaymentInfo = 'Membership Only' OR ORD.PaymentInfo = 'New > Membership and Registration') > ORDER BY MEB.MembShpDate DESC > </cfquery> > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:250105 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4