Support date range and as of date in Universe
Hi,
I have some questions on Universe design best practices. Can you please help ?
We are using BO4 SP7 and UDT for universe design.
Little bit on our schema: snow flake schema with multiple fact tables. Most of our table are 'Pure Type 6' dimension tables in which start date and end date are used to track historical data. We also have date dimension table. We want to support both 'As of date' and custom 'date range' type reporting.
Out typical use cases are like
1. All items As of date
2. All items between dates etc.
How can we model it in the Universe ?
1. We can not join every dimension with date_d dimension. So we have decided to put default conditions at Folder level. Our typical date conditions as below.
date_d.end_full_date_utc between diminetion1_d.start_date AND diminetion1_d.end_date
But problem is, table condition are not always applied. If we have A, B and C folders and if I create report by using objects from A and C then non of the condition applied to B appears in the query. This is problem for us.
2. Other approach we thought is to define start and end prompt and define a restriction condition for each and every table.
diminetion1_d.start_date > [start_date_prompt] AND diminetion1_d.end_date < [end_date_prompt]
We thought it will be too munch work as we have more than 150 tables and also 2 prompts will always appear, even of as of date, which may not look good.
3. Is there a way apply to apply these date conditions at the individual table level so that they will appear in Query when ever the table is involved in the join path ?
3. What is the best way to handle this kind of requirements, please suggest ?
Thanks
Hi,
I have some questions on Universe design best practices. Can you please help ?
We are using BO4 SP7 and UDT for universe design.
Little bit on our schema: snow flake schema with multiple fact tables. Most of our table are 'Pure Type 6' dimension tables in which start date and end date are used to track historical data. We also have date dimension table. We want to support both 'As of date' and custom 'date range' type reporting.
Out typical use cases are like
1. All items As of date
2. All items between dates etc.
How can we model it in the Universe ?
1. We can not join every dimension with date_d dimension. So we have decided to put default conditions at Folder level. Our typical date conditions as below.
date_d.end_full_date_utc between diminetion1_d.start_date AND diminetion1_d.end_date
But problem is, table condition are not always applied. If we have A, B and C folders and if I create report by using objects from A and C then non of the condition applied to B appears in the query. This is problem for us.
2. Other approach we thought is to define start and end prompt and define a restriction condition for each and every table.
diminetion1_d.start_date > [start_date_prompt] AND diminetion1_d.end_date < [end_date_prompt]
We thought it will be too munch work as we have more than 150 tables and also 2 prompts will always appear, even of as of date, which may not look good.
3. Is there a way apply to apply these date conditions at the individual table level so that they will appear in Query when ever the table is involved in the join path ?
3. What is the best way to handle this kind of requirements, please suggest ?
Thanks
Similar Messages
-
Moving multiple files by date range and/or file name filtered
I need to move multiple files by date range and/or by filename (using a filter) to another directory.
OR
How can I get the attributes of files in a directory, something you would see when typing in "dir" in a DOS or ls in UNIX. I can parse this info and then make a array of files to move.
The reason for needing this is that I need to move files that are located in another country, and sort them into different directories based on date. Having to read each file for it's file information adds wasted time that I can't afford. I am about to create a dos terminal to do a "dir" command to get the information and parse it out.. but I was hoping LV had a function that can get me that info so I don't have build it.
THanks.You should use the 'File/Directory Info' functionality.
This will return the last modificatoin of the file.
Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas
LabVIEW, programming like it should be! -
Mailbox Export - Filtered for Date Range and Body Content
I have been pulling my hair out with this one and hopefully someone can help.
I need to search a mailbox and export all (sent & received) messages that fit in a date range and also have a specific word in the body. The query I am using doesn't seem to find the term at all, but the messages it does find fit within my date range,
so part of it seems to work. The request was to not use wildcards too, only looking for the specific word in the body. Here is my one-liner...
New-MailboxExportRequest -ContentFilter {(Body -like "Something") -and (Received -gt "07/01/2012") -and (Received -lt "07/31/2012") -or (Sent -gt "07/01/2012") -and (Sent -lt "07/31/2012")} -Mailbox "SearchMailbox"
-Name "Label1" -FilePath \\server\temp\pst\Export.pst
I've also tried to search for a common word like "the" just to make sure it wasn't a case of the term simply not being in mailbox. No dice.Hi,
Agree with Nickeyclayton, you can use (body -like "*something*") instead of (body -like "something").
I recommend you refer to the following article:
Filterable Properties for the -ContentFilter Parameter
Property
Description
Values
Example syntax
Body
This property returns messages that have the specified string within the message body.
String
Wildcard
-ContentFilter {Body -like "*prospectus*"}
Hope this helps!
Thanks.
Niko Cheng
TechNet Community Support -
Dear all,
I am very new to Sharepoint designer 2010. Its better to say, i am just stepping in.
I have sharepoint site which is accessible for all the users to update few information. But i want this site not to be accessible during a date range, say from 15th to 20th of every month.
I am planning to have something like this: If any user tries to access this sharepoint site between 15th to 20th date range of everymonth, then the browser must show an pop-up alert saying "This site is not accessible during this date range" and Redirect
this sharepoint site to someother site (Say http:// somesitename.xx.com) immidiately.
I know very little about how to add Javascript in sharepoint webpart.
Please provide the Javascript or any best alternate solution to my concern.
Thanks in advance.Hi,
From your description, my understanding is that you want to redirect sharepoint site to another site between 15th and 20th every month.
I agree with what Sudip says. If you still want to use JS code,You could try these steps
below:
Open your site with SharePoint Designer.
Click Master Pages in left navigation.
Find file v4.master, and backup it(it is very important).
Right click your v4.master,
choose "Edit File in Adavance Mode".
Add the code below into the <head/> tag.
<script src="https://code.jquery.com/jquery-1.11.1.min.js" type="text/javascript"></script><script
type="text/javascript">
$(document).ready(function(){
var today = new Date();
var day = today.getDate(); // get current day
var id = _spPageContextInfo.userid; // get the id of current logon in user
var boolFlg = false;
$.ajax({
url: _spPageContextInfo.webAbsoluteUrl + "/_api/web/SiteGroups/GetByName(\'"+"sharepoint Owners"+"\')/Users", //get users in a specified group can access the sharepoint site from 15th to 20th every
month
type: "GET",
headers: {"accept": "application/json;odata=verbose"},
success: function (data) {
if (data.d.results) {
var src = data.d.results;
for(var i = 0; i < src.length; i++){
if(src[i].userid==id){ //check the logon in user in the specified group or not
boolFlg = false;
break;
if(!boolFlg){
if(day <= 20 && day >=15){
alert("This site is not accessible during this date range"); // alert the message
location.href = "http:// somesitename.xx.com"; // redirect to another site
error: function (xhr) {
alert(xhr.status + ': ' + xhr.statusText);
})</script>
Best Regards
Vincent Han
TechNet Community Support -
Differences between the Portal Data Collector and the Activity Data Collect
Hello,
I want to know what are the differences between the Portal Data Collector and the Activity Data Collector?
Best Regards.
Pablo Mortera.All of my SQL Server instances are sql server 2008r2 standard edition(10.50.2500). MDW is existing database, I try to setup collection sets for multiple instances and store data in one central MDW database
I create MDW in one instance, then run run configure Management Data Warehouse in target intance. collection sets were created successfully, but job failed with following error:
Executed as user: COCAD\INTDEPT01SQLAgentC10. The Management Data Warehouse version "00.00.0000.00" is not supported by the current data collector. Please upgrade the Management Data Warehouse by running the Management Data Warehouse Configuration
Wizard. Process Exit Code 5. The step failed.
Thanks
PAULqaz -
What forum might be useful in solving this issue:
Simple Examples of data connectivity and transfer of data from an .asp.vb to javascript in an .aspx fileThey'll help you here in the Microsoft ASP.net forums.
http://forums.asp.net/
Regards, Dave Patrick ....
Microsoft Certified Professional
Microsoft MVP [Windows]
Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights. -
How to GRN date (MIGO) and Goods posting date (MB1C) as a Characteristcs
Dear All,
Our customer wants to include GRN date (MIGO) and Goods posting date (MB1C) as a Characteristic for a batch.
And he wants the system to pick up these dates automatically for batch.
So in batches will be sorted out based on GRN (MIGO) or Goods posting (MB1C) date.
Is there any standard characteristics available for these fields?
How to achieve this functionality.
Regards,
Mullairaja
Edited by: MullaiRaja on Jan 7, 2011 8:28 AMClosed
-
Defining Date range and using the same range to search the documents.
Hi Sap Gurus,
in our business there are some documents which do have Validity period, like say Inspection certificates and valid for say 10 months, ex.. JAN 25th 2009 to Oct 24th 2009
we store this certificate in DMS and link to some SAP object say an Asset,
we have a requirement to list all the documents based on the expiry date range. say to get a list of documents which are about to expire in 15 days, or the list of documents which have already expired
I tried to define a characteristic in date format, but it is a single value field, and search is only supported on that specific value only.
like we cannot serch the DIR falling in between this Date Ranges.
also report of Documents which are to expire in 15 days could not be got.
is there a way to meet this requirement , if it is through a development also please tell me how the logic could be built
Thanks and regards
Priya SHi SAP Gurus,
Thanks much Thomas for your Promt reply.
The solution provided by Thomas really works but the same thing is not possible in EDMS,
in Easy DMS we cannot manually give any value in the date characteristics field, the system will ask to fill from the date window format.
so we cannot enter < or > <> value in characteristics, hope there is any note or other procedure to get the same funtionality.
please if any one worked on the same with EDMS let me know
Thanks and kind regards
Priya S -
Generate a report with date range and year as POV with Hyp Planning ?
Hi everybody,
I am starting with hyp planning and i need your help please.
I have to create some forms. In those forms, the final user is supposed to be able to display data in the forms between 2 dates and for a specific year.
My first problem : I don't know how you can display data in a form between 2 dates and for one specific year. I just have one dimension YEAR and one PERIOD, so if i selected them as a PAGE, the final user will just be able to choose the month and the year for his form ... and not displaying data between 2 dates.
My second problem is with the dimensions YEAR, SCENARIO and VERSION. I don't want to put the dimensions VERSION and SCENARIO as PAGE (it easier for the final user to just choose a year than to choose a year, scenario, and version) but as POV with a relationship with the dimension YEAR (because if the user chooses YEAR = actual_year (2012) the VERSION and the SCENARIO won't be the same than if the user chooses YEAR= last_year). IF YEAR = next_year, VERSION=Propuesta, SCENARIO=Forecast
IF YEAR = actual_year, VERSION=Propuesta, SCENARIO=Forecast AC
IF YEAR = last_year, VERSION=Actual, SCENARIA=Real
How can i do that?
Thank you for your help
Edited by: 932573 on May 7, 2012 3:44 PM
Edited by: 932573 on May 7, 2012 4:27 PMI am not sure if you are using RAS or Enterprise SDK, but here are some code snippets to set range report parameters:
For scheduling:
// oReport is IReport object holding the crystal report.
oReportParameter = oReport.getReportParameters().get(i);
currentRangeValue = oReportParameter.getCurrentValues().addRangeValue();
currentRangeValue.getFromValue().setValue(dateParameter);
currentRangeValue.getToValue().setValue(dateParameter);
For viewing:
ParameterFieldRangeValue pfrv = new ParameterFieldRangeValue();
pfrv.setBeginValue(dateTimeValue);
pfrv.setEndValue(dateTimeValue1);
pfrv.setLowerBoundType(RangeValueBoundType.inclusive);
pfrv.setUpperBoundType(RangeValueBoundType.inclusive);
pf.getCurrentValues().add(pfrv);
f.add(pf);
f is Fields object and pass that to viewer. -
Post Author: cht104
CA Forum: Formula
I'm new to Crystal Reports so please bear with me. I know this is easy and I'm just overlooking something obvious. I've got my report formatted and working except for the getting the date range or prompt to work and the format of the date itself. In my db, I"ve got a business_date field. I've got that showing line by line in the report as yyyymmdd, but would like to be formatted as "Sept 11, 2007" if possible. Also, for the date range, do I create a new formula or a new parameter field? How exactly is that written out? What other fields do I need to make this work?
ThanksPost Author: cht104
CA Forum: Formula
{svc_at_dtl.svan} in ["6036281297496447218", "6036281364474453041", "6036281475774461110", "6036282939574448316", "6036283115974448365", "6036283168796454200", "6036283395374462621", "6036283428674464130", "6036283753674445017", "6036283917774448418", "6036284153974449933", "6036284173996439566", "6036284257574445663", "6036284361474459493", "6036284371896470723", "6036284564874451909", "6036284758774459807", "6036284826974450872", "6036285282174468325", "6036285293874448033", "6036285529874453024", "6036285878174449855", "6036285999874448376", "6036286146296452491", "6036286186574458053", "6036286295596460760", "6036286335874446410", "6036286646674450703", "6036286674874445497", "6036286684874459826", "6036286879696436611", "6036286931974449860", "6036287191974445657", "6036287211774459063", "6036287254874446061", "6036287383874459108", "6036287395174475302", "6036287623696439776", "6036287911274449966", "6036287957774450009", "6036287972296473818", "6036289199196440994", "6036289336796478839", "6036289461796466359", "6036289792974471912", "6036289991196439695", "6275291111939468538", "6275291157455722999", "6275291342555724487", "6275291349939479559", "6275291437655724303", "6275291762455755275", "6275291867155724609", "6275291881655723946", "6275291886155724011", "6275292136155723957", "6275292195855724215", "6275292343855800229", "6275292363155724577", "6275292365155724637", "6275292431555731180", "6275292566755724381", "6275292632355723225", "6275292782455724172", "6275292851255723933", "6275292878655723921", "6275292953555723341", "6275293164155723919", "6275293169955723998", "6275293186455724649", "6275293318855723908", "6275293356655724478", "6275293373655724684", "6275293393739479064", "6275293553155724455", "6275293563655724004", "6275293586555778116", "6275293685955724201", "6275293757339475631", "6275293831955724141", "6275293834955730584", "6275293839562464447", "6275293884455723803", "6275293891639475878", "6275294142955724627", "6275294225939469203", "6275294244755724273", "6275294288755724162", "6275294326839466482", "6275294372355724667", "6275294446455724442", "6275294544655723239", "6275294595362458066", "6275294789855747474", "6275294965255727665", "6275295235155724432", "6275295284562503051", "6275295464555724584", "6275295543955724533", "6275295627755723584", "6275295787355723841", "6275295794955723386", "6275295812555723983", "6275295843555791857", "6275295862755722759", "6275295886755724259", "6275295914155723433", "6275295926255723304", "6275296134855724618", "6275296221455724401", "6275296317755723398", "6275296367355723312", "6275296369339471746", "6275296395339476301", "6275296663855724390", "6275296685255723246", "6275296714755724469", "6275296726455767720", "6275296746555724281", "6275296765355724086", "6275296772362502797", "6275296786862497240", "6275296997255724379", "6275297253355723475", "6275297266655724182", "6275297333955724555", "6275297497155723555", "6275297524455723179", "6275297573255724675", "6275297577455724220", "6275297741455812692", "6275297792755724410", "6275297869455724110", "6275297869455724110", "6275297899755723655", "6275297937155723570", "6275298123755730444", "6275298141555724499", "6275298269755791964", "6275298321455723972", "6275298361655724339", "6275298483355724658", "6275298658455722739", "6275298713155724108", "6275298747639512868", "6275298786555723464", "6275298854355724511", "6275298949755724320", "6275298993755724244", "6275299172655724547", "6275299224655724095", "6275299261439479425", "6275299271562505976", "6275299287155767711", "6275299417555724234", "6275299445555724363", "6275299463755727679", "6275299497755724052", "6275299561855724508", "6275299721255723338", "6275299743555724319", "6275299745855724293", "6275299755255769069", "6275299792555723668"]anddate(tonumber({svc_at_dtl.business_date}[1 to 4]), tonumber({svc_at_dtl.business_date}[5 to 6]), tonumber({svc_at_dtl.business_date}[7 to 8])) in {?date_range}
I dont' know if my problem is with the "and", running 2 different things in here or just the date prompt. Without the date prompt, I get my number information correctly -
SUMIFS with Date Range and Condition
Hi, I have search in the forums and read the online numbers guide but can't seem to get the formular working in Numbers.
I want to sum up a column of durations, if they are in between 2 dates and meet the condition to belong to one project. I have the following table:
project
total duration
project
start
end
duration
date range start
date range end
one
0
one
02.01.2013
02.01.2013
15:30
01.01.2013
31.01.2013
two
0
one
03.01.2013
03.01.2013
15:30
three
two
04.01.2013
04.01.2013
15:30
four
two
05.01.2013
05.01.2013
15:30
five
three
06.01.2013
06.01.2013
15:30
six
three
07.01.2013
07.01.2013
15:30
seven
three
08.01.2013
08.01.2013
15:30
I have the following formular but it does not give me any value: =SUMIFS(F,C,A5,D"≥"$G$2,E"≤"$H$2)
What am I doing wrong
Thank you for your help.Hi Barry,
thank you very much for your detailed reply.
The first difference I spot is that my duration is in hours:minutes 00:00 but this should not make a difference, right? I attach you here some sample data:
Project
Start date
Start time
End date
End time
Duration
Project 1
07.01.2013
11:00
07.01.2013
11:42
00:42
PINC: 1
07.01.2013
16:11
07.01.2013
17:11
01:00
Theatro
07.01.2013
19:50
07.01.2013
19:54
00:03
Project 3
08.01.2013
11:19
08.01.2013
13:30
02:11
Project 1
09.01.2013
12:32
09.01.2013
13:02
00:30
PINC: 1
09.01.2013
17:55
09.01.2013
18:29
00:34
Project 3
09.01.2013
18:29
09.01.2013
19:36
01:06
And I will go through my formular again and check if everything is correct.
Many greets, Andreas -
How do I select range and require end date in it crystal report
I'm trying to select a range of dates in my records however it must include the end date from my parameters what is the syntax for that record selection and anything after the Start Date (open). If the Date range doesn't end in the specified End Date then I don't want to see it.
well I created two reports one with pulling all the end dates data then the other report with the stuff before that date and put the end date as a subreport in the other one so he can see what was done recently on the subreport and scroll through the other report while the subreport stays on the results bottom end - however he has to scroll through 100's of pages to find the data he wants so he doesn't like that. However it is a good mockup of the results he wants ...but he doesn't want to scroll through 100's of pages - my guess is he wants one report with end date only and any dates before hand.
Original
Part TransactionDate Qty Unit cost
GA101 10/11/2013 5 1.23
GA101 5/25/2012 10 2.23
GA101 8/14/2011 15 5.15
HE8924 8/22/2014 14 4.25
HE8924 6/13/2012 2 3.25
UY325 8/22/2014 5 6.32
UY325 7/10/2010 2 3.25
TE5689 8/12/2014 1 8.14
TE5689 5/16/2013 2 9.12
IO8978 8/22/2014 6 8.25
IO8978 5/20/2013 8 7.25
IO8978 3/15/2012 4 9.25
IO8978 1/20/2009 5 10.25
MY CODE RESULTS SHOULD SEE
START DATE 01/01/2011 END DATE 08/22/2014
Part TransactionDate Qty Unit cost
HE8924 8/22/2014 14 4.25
HE8924 6/13/2012 2 3.25
UY325
8/22/2014
5
6.32
IO8978 8/22/2014 6 8.25
IO8978 5/20/2013 8 7.25
IO8978 3/15/2012 4 9.25 -
Find intersections in date ranges and concatenate aggregated labels
Hello All,
The original source of data will be a table of persons with their member ship:
Description StartDate EndDate
18 Smith John Poker Club 01/01/2009 NULL
18 Smith John Library 05/01/2009 18/01/2009
18 Smith John Gym 10/01/2009 28/01/2009
26 Adams Jane Pilates 03/01/2009 16/02/2009
The challenge will be to find each intersection of membership date ranges for each person and produce for this each unique range:
a new line with the StartDate and EndDate of the range
Concatenate in the description the descriptions of the memberships for this range with:
“/” as separator
order by membership StartDate
This is the table of results expected:
18 Smith John Poker Club 01/01/2009 04/01/2009
18 Smith John Poker Club / Library 05/01/2009 09/01/2009
18 Smith John Poker Club / Library / Gym 10/01/2009 18/01/2009
18 Smith John Poker Club / Gym 19/01/2009 28/01/2009
18 Smith John Poker Club 29/01/2009 NULL
26 Adams Jane Pilates 03/01/2009 16/02/2009
Sample Script:
SET DATEFORMAT dmy
DECLARE @Membership TABLE (
PersonID int,
Surname nvarchar(16),
FirstName nvarchar(16),
Description nvarchar(16),
StartDate datetime,
EndDate datetime)
INSERT INTO @Membership VALUES (18, 'Smith', 'John',
'Poker Club', '01/01/2009', NULL)
INSERT INTO @Membership VALUES (18, 'Smith', 'John',
'Library', '05/01/2009', '18/01/2009')
INSERT INTO @Membership VALUES (18, 'Smith', 'John',
'Gym', '10/01/2009', '28/01/2009')
INSERT INTO @Membership VALUES (26, 'Adams', 'Jane',
'Pilates', '03/01/2009', '16/02/2009')
Note:Make sure that your solution uses a single query that starts either with "SELECT" or "WITH" or ";WITH".
Can you please share suggestions.
Regards,
VaishuThis query
;WITH RS AS -- RangeStart
SELECT PersonID, StartDate AS RangeStart
FROM @Membership
UNION
SELECT PersonID, DATEADD(day, 1, EndDate) AS RangeStart
FROM @Membership
WHERE EndDate IS NOT NULL
RE AS -- RangeEnd
SELECT PersonID, DATEADD(day, -1, StartDate) AS RangeEnd
FROM @Membership
WHERE StartDate IS NOT NULL
UNION
SELECT PersonID, EndDate AS RangeEnd
FROM
@Membership
R AS -- Ranges
SELECT RS.PersonID, RS.RangeStart, RE.RangeEnd
FROM
RS CROSS APPLY
SELECT TOP (1) RE.RangeEnd
FROM RE
WHERE
RE.PersonID = RS.PersonID
AND (
RE.RangeEnd >= RS.RangeStart
OR RS.RangeStart IS NOT NULL AND RE.RangeEnd IS NULL
ORDER BY
ISNULL(RE.RangeEnd, '99991231')
) RE
SELECT R.*,
STUFF( (
SELECT '/' + m.Description
FROM
@Membership m
WHERE
m.PersonID = R.PersonID
AND (m.StartDate <= R.RangeEnd OR R.RangeEnd IS NULL) AND (m.EndDate >= R.RangeStart OR m.EndDate IS NULL)
FOR XML PATH('')
1, 1, '') AS Description
FROM
R
Returns this result:
PersonID
RangeStart
RangeEnd
Description
18
2009-01-01
2009-01-04
Poker Club
18
2009-01-05
2009-01-09
Poker Club/Library
18
2009-01-10
2009-01-18
Poker Club/Library/Gym
18
2009-01-19
2009-01-28
Poker Club/Gym
18
2009-01-29
NULL
Poker Club
26
2009-01-03
2009-02-16
Pilates
EntityLite: A Lightweight, Database First, Micro ORM -
Restrict Query Data based on Date range and Users
Hi All,
I have a few web reports that I need do restrict data based on Users.
In all the queries i have an infoobject 0CALDAY, and a User Entry range variable on it. Because of performance issues I need to restrict the range of dates a User can see. Typically most of users could go to a max date range of 1 month back. But some others would need the ability to see data for much bigger range of dates.
Pls suggest how should i go about with this. Should I have to enforce this at Variable level(user exit).... but then i might have to maintain a table for the users.. Is there any other way of doing it.
thanks
RajAny thoughts ?
-
Difficulty working with overlapping date ranges and sums
I have data like the following and need help querying it for a specific result:
startdate enddate place class number
03-30-2006 04-18-2006 A 22 2000
04-01-2006 04-30-2006 A 22 6000
03-30-2006 04-15-2006 B 11 1700
03-15-2006 04-12-2006 B 11 2900
I'd like to return the sum of the averages for any given day, by place, and by class, like this:
day place class average
03-15-2006 B 11 100
03-16-2006 B 11 100
03-30-2006 A 22 100
03-30-2006 B 11 200
03-31-2006 A 22 100
03-31-2006 B 11 200
04-1-2006 A 22 300
04-01-2006 B 11 200
04-30-2006 A 11 200
I'm stuck, any help would be GREATLY appreciated.307b218a-cebe-46f1-87b6-946b4076ce79 wrote:
Here is what I said in my original post:
I'd like to return the sum of the averages for any given day, by place, and by class.....Then gave an example of output.
I think that sentence describes the relations perfectly succinctly.
How can it, when there's no SUM involved
307b218a-cebe-46f1-87b6-946b4076ce79 wrote:
For the date of 3-30-2006, the sum of the averages for region A in class 22 is 100, since from 3-30-2006 to 4-18-2006 is 20 days, and 2000/20 = 100, and there are no other class 22's in place A in that date range. Same goes for 3-31-20006.
However for 4-1-2006 the sum of the averages is 300, since I have one record who's average is 100 (2000/20), and another (6000/30 = 200) and 200 + 100 = 300.
For 4/30, I have one average in that range for place A class 22, and its average for that period is 200.
Does that help?
Much better, thank-you ..
try this:
WITH data AS (
SELECT TO_DATE('03-30-2006','mm-dd-yyyy') startdate, TO_DATE('04-18-2006','mm-dd-yyyy') enddate, 'A' place, 22 class, 2000 cnumber FROM DUAL UNION ALL
SELECT TO_DATE('04-01-2006','mm-dd-yyyy') startdate, TO_DATE('04-30-2006','mm-dd-yyyy') enddate, 'A' place, 22 class, 6000 cnumber FROM DUAL UNION ALL
SELECT TO_DATE('03-30-2006','mm-dd-yyyy') startdate, TO_DATE('04-15-2006','mm-dd-yyyy') enddate, 'B' place, 11 class, 1700 cnumber FROM DUAL UNION ALL
SELECT TO_DATE('03-15-2006','mm-dd-yyyy') startdate, TO_DATE('04-12-2006','mm-dd-yyyy') enddate, 'B' place, 11 class, 2900 cnumber FROM DUAL ),
data2 AS ( SELECT startdate, enddate, enddate-startdate+1 numdays, place, class, cnumber
FROM data d
SELECT startdate+x.lvl day, place, class, cnumber/numdays avg
FROM data2 d,
( SELECT level lvl FROM dual CONNECT BY level <= 10000 ) x
WHERE x.lvl <= numdays
ORDER BY d.startdate, x.lvl
It helps to be specific and detailed
Maybe you are looking for
-
ASA 5505-VPN- Can't use AD services
New install:5505 VPN with MS Active Directory services on LAN. I can VPN into the network but cannot e.g. join my laptop to the Domain. Message says "cannot find "domain" I can: ping the PDC, RDP onto the PDC or any system on the LAN. Also applicatio
-
In the new iTunes the play list total time displays in 1.5 hours format, how do I get it to clearly show 1hr 31min 12sec like before, I want the exact time so I can properly fit all the songs when I want to burn this playlist to a disc. You can no lo
-
Hello , Can any one tell me why the following is not retuning (0) as indication that S and S2 Strings are equal? java.text.NumberFormat currency = java.text.NumberFormat.getCurrencyInstance(new java.util.Locale("sv", "SE" ) ); String S = "1 234,56";
-
This problem has been brought up and I tried every possible solution...uninstalled and re-installed...updated, etc. The video shows the opening frame, but when I try to play, I get the same error message "am error occured, please try again later" The
-
hi, can anyone please help me with the following: The description for Event ID 8306 from source Microsoft-SharePoint Products-SharePoint Foundation cannot be found. Either the component that raises this event is not installed on your local computer o