Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Monday, November 25, 2024 
 
slxdeveloper.com Community Forums  
   
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
 Reporting & Notification Forums - Reporting
Forum to discuss reports for SalesLogix including Crystal, SQL Reports, etc. View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to Reporting | New ThreadView:  Search:  
 Author  Thread: No History for No Activity for a perticular date range
Khevna Mehta
Posts: 34
 
No History for No Activity for a perticular date rangeYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 09 May 07 4:55 PM
fiogf49gjkf0d
I need to generate a report where accounts has no activity or history for a given time period...Has anyone done this? Ccan you please give me some insight......

All your help is highly appreciated.............
[Reply][Quote]
Walter Shpuntoff
Posts: 167
 
Re: No History for No Activity for a perticular date rangeYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 10 May 07 7:24 AM
fiogf49gjkf0d
You just need to base your report on a query along the lines of

select [account information] from account
where accountid not in
(select accountid from activity where startdate between [your date range]
union
select accountid from history where completeddate between [your date range])

That should be enough to get your started...

ws
[Reply][Quote]
Peter Hebenstreit
Posts: 3
 
Re: No History for No Activity for a perticular date rangeYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 10 May 07 8:41 AM
fiogf49gjkf0d
It's a little more complicated than that, I had this same need. I created a view in sql and then ran my report against that, this view looks at the history table and attachment table to verify that neither has been updated in 90 days.

SELECT distinct ACCOUNTID as a_ACCOUNTID , account
from SYSDBA.ACCOUNT
where
(
ACCOUNTID in (SELECT distinct att.[ACCOUNTID] as att_ACCOUNTID
fROM [SalesLogix].[SYSDBA].[ATTACHMENT] att
where ATTACHDATE < getdate()-90
and [ACCOUNTID] not in ( select [ACCOUNTID] from
[SalesLogix].[SYSDBA].[ATTACHMENT]
where ATTACHDATE >= getdate()-90
AND ACCOUNTID IS NOT NULL))
or
ACCOUNTID in ( select at_ACCOUNTID
from ( select distinct att.[ACCOUNTID] att_ACCOUNTID, at.[ACCOUNTID] as at_ACCOUNTID
from [SalesLogix].[SYSDBA].[ATTACHMENT] att , [SalesLogix].SYSDBA.ACCOUNT at
where att.[ACCOUNTID] =* at.[ACCOUNTID] ) XX
where att_ACCOUNTID is null
and at_ACCOUNTID is not null )
)
and
( ACCOUNTID in (SELECT distinct hst.[ACCOUNTID] as hst_ACCOUNTID
fROM [SalesLogix].[SYSDBA].[HISTORY] hst
where [MODIFYDATE] < getdate()-90
and [ACCOUNTID] not in ( select [ACCOUNTID] from
[SalesLogix].[SYSDBA].[HISTORY]
where [MODIFYDATE] >= getdate()-90
AND ACCOUNTID IS NOT NULL))
or
ACCOUNTID in (select at_ACCOUNTID as hst_ACCOUNTID
from ( select distinct hst.[ACCOUNTID] hst_ACCOUNTID, at.[ACCOUNTID] as at_ACCOUNTID
from [SalesLogix].[SYSDBA].[HISTORY] hst , [SalesLogix].SYSDBA.ACCOUNT at
where hst.[ACCOUNTID] =* at.[ACCOUNTID] ) XX
where hst_ACCOUNTID is null
and at_ACCOUNTID is not null )
)
and CREATEDATE < getdate() -90
[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2024 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 11/25/2024 12:05:33 PM