I have an Access 2003 db that contains user hit info. I want to create a report that shows only the new users since last month. I created a report that lists the current month's user info. This is the SQL query in Crystal 10:
CODE
SELECT `allkbusers_OLD`.`USERID`, `allkbusers_OLD`.`HIT_TIME`,
`RPN_data`.`CustomerName`, `RPN_data`.`LastName`, `RPN_data`.`FirstName`,
`RPN_data`.`Email`
FROM `RPN_data` `RPN_data` INNER JOIN `allkbusers_OLD` `allkbusers_OLD`
ON `RPN_data`.`ContactID`=`allkbusers_OLD`.`USERID`
WHERE (`allkbusers_OLD`.`HIT_TIME`>=#2008-10-01 00:00:00# AND
`allkbusers_OLD`.`HIT_TIME`<#2008-11-01 00:00:00#)
ORDER BY `allkbusers_OLD`.`USERID`, `RPN_data`.`LastName`
This is the selection criteria (users are prompted with the DateRange parameter):
{allkbusers_OLD.HIT_TIME} = {?DateRange}
I tried to add a second date range after the first one in the SQL query with "AND NOT (`allkbusers_OLD`.`HIT_TIME`>=#2008-9-01 00:00:00# AND `allkbusers_OLD`.`HIT_TIME`<#2008-10-01 00:00:00#)" in it, but the results were the same. Then I took that out and tried adding "and if {allkbusers_OLD.HIT_TIME} <> LastFullMonth then true" to the selection criteria, but that also returned the same results.
Does anyone have any suggestions about how to compare this month's data with last month's data and then only show the difference between the two (which would be the new users)?
CODE
SELECT `allkbusers_OLD`.`USERID`, `allkbusers_OLD`.`HIT_TIME`,
`RPN_data`.`CustomerName`, `RPN_data`.`LastName`, `RPN_data`.`FirstName`,
`RPN_data`.`Email`
FROM `RPN_data` `RPN_data` INNER JOIN `allkbusers_OLD` `allkbusers_OLD`
ON `RPN_data`.`ContactID`=`allkbusers_OLD`.`USERID`
WHERE (`allkbusers_OLD`.`HIT_TIME`>=#2008-10-01 00:00:00# AND
`allkbusers_OLD`.`HIT_TIME`<#2008-11-01 00:00:00#)
ORDER BY `allkbusers_OLD`.`USERID`, `RPN_data`.`LastName`
This is the selection criteria (users are prompted with the DateRange parameter):
{allkbusers_OLD.HIT_TIME} = {?DateRange}
I tried to add a second date range after the first one in the SQL query with "AND NOT (`allkbusers_OLD`.`HIT_TIME`>=#2008-9-01 00:00:00# AND `allkbusers_OLD`.`HIT_TIME`<#2008-10-01 00:00:00#)" in it, but the results were the same. Then I took that out and tried adding "and if {allkbusers_OLD.HIT_TIME} <> LastFullMonth then true" to the selection criteria, but that also returned the same results.
Does anyone have any suggestions about how to compare this month's data with last month's data and then only show the difference between the two (which would be the new users)?