In this context, #DateDiff()# is a ColdFusion function.  If you want the
database's DateDiff() function, remove the #s.

The error occurs because CF thinks it is parsing a CF variable,
MEB.MembShpDate but there is no structure named MEB.

M!ke 

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]

Sent: Wednesday, August 16, 2006 8:24 PM
To: CF-Talk
Subject: Datediff help

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:250104
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to