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: Multiple date range on a query
Betsy
Posts: 1
 
Multiple date range on a queryYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 16 Jul 08 10:41 AM
Is it possible to create a query with multiple date ranges, such as quarters?
[Reply][Quote]
Snow Monkey
Posts: 214
 
Re: Multiple date range on a queryYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 25 Jul 08 2:17 PM
Yes ....

Union of four queries ...One for each quarter

On each one a case statement of Month numbers and if in the range of that quarter , then compute whatever you want to do.While on one quarter create a NULL column for the other quarter figures.

At this point, you will get the combined result of all quarters in different columns. Aggregate it(Max, Sum etc..i dont know which one) to get the desired result you want..

Select Id , case month_num Case 1 or 2 or 3 then "first quarter" , NULL as Second quarter
from tablename.

Create something along these lines.

Create the query and get back to us what you've got. I am sure we will get some idea about the fieldnames and will be able to get to better , clearer sql..

Once you erify the query, then create a sql view with that and use that in the cr to get better cr performance....
[Reply][Quote]
Phil Parkin
Posts: 819
Top 10 forum poster: 819 posts
 
Re: Multiple date range on a queryYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 27 Jul 08 6:25 PM
Can you be a bit more specific about the sort of output that you want? Whatever it is that you are trying to do, the chances are that someone here will know a way ...

Phil
[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 10:36:47 AM