T
Tim
I'm attempting to build a query that will become an end-
user report. What I'm attempting to do is find people
who have a free drink coming ([JDMAIN].[NUMBERFREE]>0)
and that works fine, but I'm unable to find who has made
a purchase within the last 30 days.
Is DateDiff wrong for this? Is there a better way? I'm
not sure my syntax is correct in the statement below
either. It's built in an SQL window, so that's what I
copied and pasted. I know it appears that I need a _ in
a few places, but in the SQL window, I don't.
SELECT [JDMAIN].[JDNAME] AS [Customer's Name]
FROM JDMain
WHERE (( [JDMAIN].[NUMBERFREE]>0) and(DateDiff
("m","d","yyyy", [DATEOFPURCH],NOW() < 31))
ORDER BY [JDMAIN].[JDNAME];
Thanks in advance.
user report. What I'm attempting to do is find people
who have a free drink coming ([JDMAIN].[NUMBERFREE]>0)
and that works fine, but I'm unable to find who has made
a purchase within the last 30 days.
Is DateDiff wrong for this? Is there a better way? I'm
not sure my syntax is correct in the statement below
either. It's built in an SQL window, so that's what I
copied and pasted. I know it appears that I need a _ in
a few places, but in the SQL window, I don't.
SELECT [JDMAIN].[JDNAME] AS [Customer's Name]
FROM JDMain
WHERE (( [JDMAIN].[NUMBERFREE]>0) and(DateDiff
("m","d","yyyy", [DATEOFPURCH],NOW() < 31))
ORDER BY [JDMAIN].[JDNAME];
Thanks in advance.