jonnycattt
Registered User.
- Local time
- Today, 19:45
- Joined
- Sep 29, 2001
- Messages
- 20
Greetings. I am using ColdFusion to return a recordset, but I want to turn the CF query into an Access query. My problem is that I use variables in the CF query and I don't know how to rewrite this as an access query. Here's my CF code:
set variables:
<CFSET TargetDate=Now()>
<CFSET TwoDaysAgo=DateAdd("d",-2,TargetDate)>
sql statement:
SELECT ArticleID, AuFirstName, AuLastName, CorAuEmail, CorAuFirstName, CorAuLastName, LogicID, MailDate, WasNagged, SendNoNag, IssueMonth
FROM JPET
WHERE (WasNagged<>'Yes' OR WasNagged Is Null)
AND (MailDate<=#TwoDaysAgo#)
AND (PagesReturned Is Null)
AND (SendNoNag<>'Yes' OR SendNoNag Is Null)
The thing is, I need to learn how to set the targetdate and TwoDaysAgo parameters in Access and then use those parameters in the sql statement.
thanks in advance for any help.
Marc
set variables:
<CFSET TargetDate=Now()>
<CFSET TwoDaysAgo=DateAdd("d",-2,TargetDate)>
sql statement:
SELECT ArticleID, AuFirstName, AuLastName, CorAuEmail, CorAuFirstName, CorAuLastName, LogicID, MailDate, WasNagged, SendNoNag, IssueMonth
FROM JPET
WHERE (WasNagged<>'Yes' OR WasNagged Is Null)
AND (MailDate<=#TwoDaysAgo#)
AND (PagesReturned Is Null)
AND (SendNoNag<>'Yes' OR SendNoNag Is Null)
The thing is, I need to learn how to set the targetdate and TwoDaysAgo parameters in Access and then use those parameters in the sql statement.
thanks in advance for any help.
Marc