Grouping data by date
I'm new to sql, and I need a little help to get me started: how would i
DATE_TIME ERROR_CODE
12/27/2009 12:06:59 PM 28
3/17/2010 10:23:06 PM 28
4/8/2010 7:24:54 AM 28
12/25/2009 8:35:15 PM 32
12/25/2009 8:35:15 PM 28
12/25/2009 8:35:15 PM 32
12/25/2009 8:35:15 PM 28
12/25/2009 8:35:16 PM 28
12/25/2009 8:35:16 PM 32
12/25/2009 8:35:17 PM 28
12/25/2009 8:35:18 PM 28
12/25/2009 8:35:21 PM 32
You would ...
GROUP BY <column_you_want>So for example, in the data you've posted.
select date_time, count(*)
from <your_table>
group by date_timeIf you're looking for something else, please post some sample output as to what you're looking for and explain why. Vague questions often lead to more questions and just consume time for all involved.
Also, posting your Oracle version is often quite useful (for you as well as us).
select * from v$version;
Similar Messages
-
Post Author: tadj188#
CA Forum: Formula
Needed: Sum of LineCount Including Groups and Detail Data On Each Page Used To Generate New Page If TotalPageLineCount > 28
Background:
1) Report SQL is created with unions to have detail lines continue on a page, until it reaches page footer or report footer, rather than using subreports. A subreport report is now essentially a group1a, group1b, etc. (containing column headers and other data within the the report with their respective detail lines). I had multiple subreports and each subreport became one union.
Created and tested, already:
1) I have calculated @TotalLineForEachOfTheSameGroup, now I need to sum of the individual same group totals to get the total line count on a page.
Issue:
1) I need this to create break on a certain line before, it dribbles in to a pre-printed area.
Other Ideas Appreciated:
1) Groups/detail lines break inconveniently(dribble) into the pre-printed area, looking for alternatives for above situation.
Thank you.
Tadjexport all image of each page try like this
var myDoc = app.activeDocument;
var myFolder = myDoc.filePath;
var myImage = myDoc.allGraphics;
for (var i=0; myImage.length>i; i++){
app.select(myImage[i]);
var MyImageNmae = myImage[i].itemLink.name;
app.jpegExportPreferences.jpegQuality = JPEGOptionsQuality.high;
app.jpegExportPreferences.exportResolution = 300;
app.selection[0].exportFile(ExportFormat.JPG, File(myFolder+"/"+MyImageNmae+".JPEG"), false);
alert(myImage[i].itemLink.name) -
Count(*) with group by max(date)
SQL> select xdesc,xcust,xdate from coba1 order by xdesc,xcust,xdate;
XDESC XCUST XDATE
RUB-A 11026 01-JAN-06
RUB-A 11026 05-JAN-06
RUB-A 11026 08-JAN-06
RUB-A 11027 10-JAN-06
RUB-B 11026 02-JAN-06
RUB-B 11026 08-JAN-06
RUB-B 11026 09-JAN-06
RUB-C 11027 08-JAN-06
I want to make sql that result :
XDESC COUNT(*)
RUB-A 2
RUB-B 1
RUB-C 1
Criteria : GROUPING: XDESC XCUST AND MAX(DATE)
bellow mark *** that was selected in count.
XDESC XCUST XDATE
RUB-A 11026 01-JAN-06
RUB-A 11026 05-JAN-06
RUB-A 11026 08-JAN-06 ***
RUB-A 11027 10-JAN-06 ***
---------------------------------------------------------COUNT RUB-A = 2
RUB-B 11026 02-JAN-06
RUB-B 11026 08-JAN-06
RUB-B 11026 09-JAN-06 ***
---------------------------------------------------------COUNT RUB-B = 1
RUB-C 11027 08-JAN-06 ***
--------------------------------------------------------COUNT RUB-C = 1
Can Anybody help ?
I tried :
select xdesc,max(xdate),count(max(xdate)) from coba1 group by xdesc
ERROR at line 1:
ORA-00937: not a single-group group function
ThankThis one is duplicate. see the following link
Count(*) with group by max(date)
Thanks -
Payment Medium Workbench - Group by Posting Date
I have made a medium format with DMEE Engine but it doesn't work as I would like.
I want to have a file with all items group by posting date (subtotals group by posting date, no depends on vendor).
I have 2 leveles:
- Level 1: Repetition Factor 1 and Key Field FPAYP-FAEDT (Posting Date)
- Level 2: Repetition Factor 999999 and Key Field FPAYP-DOC2R (Document unique key)
However when I execute F110 transaction it generates different files, WHY?
One file per vendor and posting date, but I WANT TO HAVE A UNIQUE FILE.
Example
Vendor Posting Date Ammount
ITEM 1: xx 15/10/2007 100
ITEM 2: xx 15/10/2007 200
ITEM 3: yy 15/10/2007 300
ITEM 4: xx 21/10/2007 400
ITEM 5: zz 21/10/2007 500
Output (wrong)
FILE1:
15/10/2007
xx 100
xx 200
300
FILE2:
15/10/2007
yy 300
300
FILE3:
21/10/2007
xx 400
400
FILE4:
21/10/2007
zz 500
500
Output (ok)
FILE1:
15/10/2007
xx 100
xx 200
yy 300
600
21/10/2007
xx 400
zz 500
900
Thanks in advanced!Ok, the problem has been fixed.
The repetition factor for level 1 (Posting Date) should be 9999999 instead of 1, beacuse it refers to input data and it doesn't refer to output data.
We can have differents posting dates in input data, but we want to have a unique line by posting date in output data.
Regards! -
Group by with date range.
Hi,
I am looking for effective usage of Group by against date range.
I have a transaction table as below.
Date customer_no amount_paid
01-Dec-13 001 500
02-Dec-13 001 360
09-Dec-13 001 200
02-Nov-13 001 360
09-Nov-13 001 200
02-Nov-13 001 360
09-Oct-13 001 200
02-Oct-13 001 360
09-Oct-13 001 200
02-Sep-13 001 360
09-Sep-13 001 200
............... etc.
I would like to see sum(amount_paid) by past date ranges 1-30 days, 31-60 days, 61-90 days.
Below are expected results.
Customer Duration amount_paid
001 1-30 980
001 31-60 450
001 61-90 1200
002 1-30 300
002 31-60 490
002 61-90 320
003 1-30 450
......................etc.
I have to group by customer no and date range (1-30, 31-60, 61-90..etc).
Can someone help me getting query for this.
Thanks...
Sreeram.SQL> with t
2 as
3 (
4 select to_date('01-Dec-13', 'dd-Mon-rr') dt, '001' customer_no, 500 amount_paid from dual
5 union all
6 select to_date('02-Dec-13', 'dd-Mon-rr') dt, '001' customer_no, 360 amount_paid from dual
7 union all
8 select to_date('09-Dec-13', 'dd-Mon-rr') dt, '001' customer_no, 200 amount_paid from dual
9 union all
10 select to_date('02-Nov-13', 'dd-Mon-rr') dt, '001' customer_no, 360 amount_paid from dual
11 union all
12 select to_date('09-Nov-13', 'dd-Mon-rr') dt, '001' customer_no, 200 amount_paid from dual
13 union all
14 select to_date('02-Nov-13', 'dd-Mon-rr') dt, '001' customer_no, 360 amount_paid from dual
15 union all
16 select to_date('09-Oct-13', 'dd-Mon-rr') dt, '001' customer_no, 200 amount_paid from dual
17 union all
18 select to_date('02-Oct-13', 'dd-Mon-rr') dt, '001' customer_no, 360 amount_paid from dual
19 union all
20 select to_date('09-Oct-13', 'dd-Mon-rr') dt, '001' customer_no, 200 amount_paid from dual
21 union all
22 select to_date('02-Sep-13', 'dd-Mon-rr') dt, '001' customer_no, 360 amount_paid from dual
23 union all
24 select to_date('09-Sep-13', 'dd-Mon-rr') dt, '001' customer_no, 200 amount_paid from dual
25 )
26 select customer_no
27 , ((grp_val - 1) * 30) + 1 start_val
28 , grp_val * 30 end_val
29 , sum(amount_paid) amount_paid
30 from (
31 select dt
32 , customer_no
33 , amount_paid
34 , ceil(sum(dt_interval) over(partition by customer_no order by dt)/30) grp_val
35 from (
36 select dt
37 , customer_no
38 , amount_paid
39 , nvl(dt - lag(dt) over(partition by customer_no order by dt), 1) dt_interval
40 from t
41 )
42 )
43 group
44 by customer_no
45 , grp_val
46 order
47 by grp_val;
CUS START_VAL END_VAL AMOUNT_PAID
001 1 30 560
001 31 60 760
001 61 90 920
001 91 120 1060
SQL> -
Grouping with 2 date in sql server
totle_count
dt
name
program_id
1
1/3/2015
Tea
14
1
1/5/2015
Tea
14
1
1/6/2015
Lunch
13
17
1/6/2015
Tea
14
2
1/9/2015
Breakfast
1008
39
1/10/2015
Breakfast
1008
4
1/19/2015
Breakfast
1008
1
1/19/2015
Dinner
1009
3
1/21/2015
Tea
14
totle_count
dt
name
program_id
1
1/6/2015 and 1/8/2015
Lunch
13
2
1/3/2015 and 1/5/2015
Tea
14
17
1/6/2015 and 1/9/2015
Tea
14
3
1/21/2015 and 1/23/2015
Tea
14
41
1/9/2015 and 1/11/2015
Breakfast
1008
4
1/18/2015 and 1/20/2015
Breakfast
1008
1
1/18/2015 and1/20/2015
Dinner
1009
Here is 2 table, 1st is my row table, and I want to group with 2 date.
Here is 3 days difference. and sum of value is coming.
2nt table is my expectation table.
Plz help me for this problem.
Thanks
SamirI am doing 3 days grouping here
"dt" is name of date column
if "dt" column has '1/19/2015' then next in group it will come in "1/18/2015 and1/20/2015"
any date of 18 or 19 0r 20 it will come in "1/18/2015 and1/20/2015"
and counting will add between 3 date
Sorry your posted output is not as per above rule
How did row for 1/6/2015 and 1/9/2015 got included then. If you group by 3 days you wont get
this row as 6-9 is 4 days not 3 days
Please Mark This As Answer if it solved your issue
Please Vote This As Helpful if it helps to solve your issue
Visakh
My Wiki User Page
My MSDN Page
My Personal Blog
My Facebook Page -
Consumption report Date to date ,Group & itemwise
Dear Sap Expets,
Can you please advise me that i want to make consumption report Date to date ,Group & itemwise ,in summary report (Total Qty and Value consumed).How is the possible it?
Thanks
mohitHi,
Use MB5B report for the same, it will give you qty & values for overall receipts and issues for certain period or else refer report MC.2
Hope this will resolve your issue.
Thanks & Regards,
Sandesh Sawant -
Using Authorization group field in Data entry profile
Hi,
I would need some help in configuring/using the authorization group field in data entry profile.
After setting up the values in the drop down, how do we link to the authorization profiles or roles .
basically, I would like to know the steps/activities required to use this fieldcross posting->thread locked.
-
Dynamically group records by date
I am attempting to create a report that will dynamically group records into a set number of date buckets. This is similar to grouping records by a date field and setting the days, weeks, months, etc property but instead of grouping by a set time span I want to a specific number of date groups regardless of date span. So say i have records where the first date is today at 1am and the last record is today at 9 pm. I want the data grouped into 10 groups and the time calculated for that group based on total time span / 10. The first group would be 1AM to 3AM, the second would group 3AM to 5AM, etc.. The reason I am doing this is for a chart that displays record counts over time but the overall timespan will never be known until runtime. Setting the chart for hourly or weekly doesn't work because if the user runs the report over a year the dates will be illegible.
Thanks in advance!Well this SHOULD be easy. But leave it to CR make not...
You can start by finding the minimum & maximum dates within your range:
Local DateTimeVar MinDate;
MinDate := Minimum({Table.DateField})
and
Local DateTimeVar MaxDate;
MaxDate := Maximum({Person.ModifiedDate})
Then figure out what the the interval would be if the span is broken down into 10 equal parts"
DateDiff("n", {@MinDate}, {@MaxDate}) / 10
From there just use a formula to segregate each records into the appropriate groups:
EvaluateAfter({@Interval});
IF {Table.DateField} >= {@MinDate}
AND {Table.DateField} <= DateAdd("n",{@Interval}, {@MinDate}) THEN 1 ELSE
IF {Table.DateField} > DateAdd("n",{@Interval}, {@MinDate})
AND {Table.DateField} <= DateAdd("n",{@Interval} * 2, {@MinDate}) THEN 2 ELSE
IF {Table.DateField} > DateAdd("n",{@Interval} * 2, {@MinDate})
AND {Table.DateField} <= DateAdd("n",{@Interval} * 3, {@MinDate}) THEN 3 ELSE
IF{Table.DateField} > DateAdd("n",{@Interval} * 3, {@MinDate})
AND{Table.DateField} <= DateAdd("n",{@Interval} * 4, {@MinDate}) THEN 4 ELSE
IF {Table.DateField} > DateAdd("n",{@Interval} * 4, {@MinDate})
AND {Table.DateField} <= DateAdd("n",{@Interval} * 5, {@MinDate}) THEN 5 ELSE
IF {Table.DateField} > DateAdd("n",{@Interval} * 5, {@MinDate})
AND {Table.DateField} <= DateAdd("n",{@Interval} * 6, {@MinDate}) THEN 6 ELSE
IF {Table.DateField} > DateAdd("n",{@Interval} * 6, {@MinDate})
AND {Table.DateField} <= DateAdd("n",{@Interval} * 7, {@MinDate}) THEN 7 ELSE
IF {Table.DateField} > DateAdd("n",{@Interval} * 7, {@MinDate})
AND{Table.DateField} <= DateAdd("n",{@Interval} * 8, {@MinDate}) THEN 8 ELSE
IF {Table.DateField} > DateAdd("n",{@Interval} * 8, {@MinDate})
AND {Table.DateField} <= DateAdd("n",{@Interval} * 9, {@MinDate}) THEN 9 ELSE
IF {Table.DateField} > DateAdd("n",{@Interval} * 9, {@MinDate})
AND {Table.DateField} <= {@MaxDate} THEN 10
This is where CR drops the ball... IMHO... it WON'T allow you to to group by a formula field that uses an aggregate in the formula (in this case Minimum & Maximum)... It will however allow to to graph on it, which I assume is what you are actually trying to do. If anyone knows a way to work around the grouping issue, I'd love to know it myself.
HTH,
Jason -
Count, Group by between dates
I am trying to count the number of IDs dropped and enrolled in each unit for each of the 4 terms between their perspective dates.
There are 4 Terms and an ID can participate in a unit in any of these terms:
TERM
START_DATE
END_DATE
1
25-Feb-13
18-Mar-13
2
27-May-13
17-Jun-13
3
26-Aug-13
16-Sep-13
4
25-Nov-13
16-Dec-13
I am trying to count how many IDs enrolled in a unit between those dates and how many doped before the end date
The ENROL_DATE for each ID in a unit has to be between the given Term Dates to count.
Unit KIS has 1 ENROL and one DROP in TERM 1
UNIT POL occurs in TERM 2 and 4 and both DROP
UNIT LIN and 1 ENROL and 1 DROP in 2 different TERMS
My problem is how do i specify count ENROL and count drop between the Term dates and then group by TERM and UNIT.
Please see below table for given data and expected result. It should make sense.
Thanks,
{code}
CREATE TABLE DAN_GR4
(ID NUMBER(12),
STATUS VARCHAR2(12),
TERM NUMBER(12),
ENROL_DTE DATE,
TERM_START_DTE DATE,
TERM_END_DATE DATE,
UNIT VARCHAR2 (12));
INSERT INTO DAN_GR4 (ID,STATUS,TERM,ENROL_DTE,TERM_START_DTE,TERM_END_DATE,UNIT) VALUES ('1', 'ENROL' ,'1', '15-Mar-13' ,'25-Feb-13' ,'18-Mar-13', 'KIS');
INSERT INTO DAN_GR4 (ID,STATUS,TERM,ENROL_DTE,TERM_START_DTE,TERM_END_DATE,UNIT) VALUES ('1', 'DROP' ,'2', '27-MAY-13' ,'27-MAY-13' ,'17-JUN-13', 'POL');
INSERT INTO DAN_GR4 (ID,STATUS,TERM,ENROL_DTE,TERM_START_DTE,TERM_END_DATE,UNIT) VALUES ('1', 'DROP' ,'2', '27-JUN-13' ,'27-MAY-13' ,'17-JUN-13', 'LIN');
INSERT INTO DAN_GR4 (ID,STATUS,TERM,ENROL_DTE,TERM_START_DTE,TERM_END_DATE,UNIT) VALUES ('1', 'DROP' ,'3', '27-JUN-13' ,'27-MAY-13' ,'17-JUN-13', 'PUI');
INSERT INTO DAN_GR4 (ID,STATUS,TERM,ENROL_DTE,TERM_START_DTE,TERM_END_DATE,UNIT) VALUES ('2', 'DROP' ,'3', '26-SEP-13' ,'26-AUG-13' ,'16-SEP-13', 'POL');
INSERT INTO DAN_GR4 (ID,STATUS,TERM,ENROL_DTE,TERM_START_DTE,TERM_END_DATE,UNIT) VALUES ('2', 'ENROL' ,'4', '26-NOV-13' ,'25-NOV-13' ,'16-DEC-13', 'LIN');
INSERT INTO DAN_GR4 (ID,STATUS,TERM,ENROL_DTE,TERM_START_DTE,TERM_END_DATE,UNIT) VALUES ('3', 'DROP' ,'4', '15-DEC-13' ,'25-NOV-13' ,'16-DEC-13', 'LIN');
INSERT INTO DAN_GR4 (ID,STATUS,TERM,ENROL_DTE,TERM_START_DTE,TERM_END_DATE,UNIT) VALUES ('3', 'DROP' ,'4', '15-DEC-13' ,'25-NOV-13' ,'16-DEC-13', 'POL');
INSERT INTO DAN_GR4 (ID,STATUS,TERM,ENROL_DTE,TERM_START_DTE,TERM_END_DATE,UNIT) VALUES ('3', 'DROP' ,'1', '15-DEC-13' ,'25-FEB-13' ,'18-MAR-13', 'KIS');
{code}
GIVES:
ID
STATUS
TERM
ENROL_DTE
TERM_START_DTE
TERM_END_DATE
UNIT
1
ENROL
1
15-Mar-13
25-Feb-13
18-Mar-13
KIS
1
DROP
2
27-May-13
27-May-13
17-Jun-13
POL
1
DROP
2
27-Jun-13
27-May-13
17-Jun-13
LIN
1
DROP
3
27-Jun-13
27-May-13
17-Jun-13
PUI
2
DROP
3
26-Sep-13
26-Aug-13
16-Sep-13
POL
2
ENROL
4
26-Nov-13
25-Nov-13
16-Dec-13
LIN
3
DROP
4
15-Dec-13
25-Nov-13
16-Dec-13
LIN
3
DROP
4
15-Dec-13
25-Nov-13
16-Dec-13
POL
3
DROP
1
15-Dec-13
25-Feb-13
18-Mar-13
KIS
WANT:
UNIT
TERM_START_DTE
DROP_BEFORE_END_DATE
TERM
KIS
1
1
1
POL
1
2
POL
1
3
POL
1
4
LIN
1
1
4
LIN
1
2
PUI
1
3
USING:
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64biwith
dan_gr4 as
(select '1' id,
'ENROL' status,
'1' term,
to_date('15-Mar-13','dd-MON-rr') enrol_dte,
to_date('25-Feb-13','dd-MON-rr') term_start_dte,
to_date('18-Mar-13','dd-MON-rr') term_end_dte,
'KIS' unit
from dual
union all
select '1','DROP','2',to_date('27-MAY-13','dd-MON-rr'),to_date('27-MAY-13','dd-MON-rr'),to_date('17-JUN-13','dd-MON-rr'),'POL' from dual union all
select '1','DROP','2',to_date('27-JUN-13','dd-MON-rr'),to_date('27-MAY-13','dd-MON-rr'),to_date('17-JUN-13','dd-MON-rr'),'LIN' from dual union all
select '1','DROP','3',to_date('27-JUN-13','dd-MON-rr'),to_date('27-MAY-13','dd-MON-rr'),to_date('17-JUN-13','dd-MON-rr'),'PUI' from dual union all
select '2','DROP','3',to_date('26-SEP-13','dd-MON-rr'),to_date('26-AUG-13','dd-MON-rr'),to_date('16-SEP-13','dd-MON-rr'),'POL' from dual union all
select '2','ENROL','4',to_date('26-NOV-13','dd-MON-rr'),to_date('25-NOV-13','dd-MON-rr'),to_date('16-DEC-13','dd-MON-rr'),'LIN' from dual union all
select '3','DROP','4',to_date('15-DEC-13','dd-MON-rr'),to_date('25-NOV-13','dd-MON-rr'),to_date('16-DEC-13','dd-MON-rr'),'LIN' from dual union all
select '3','DROP','4',to_date('15-DEC-13','dd-MON-rr'),to_date('25-NOV-13','dd-MON-rr'),to_date('16-DEC-13','dd-MON-rr'),'POL' from dual union all
select '3','DROP','1',to_date('15-DEC-13','dd-MON-rr'),to_date('25-FEB-13','dd-MON-rr'),to_date('18-MAR-13','dd-MON-rr'),'KIS' from dual
select unit,term,max(decode(enrolled,'within','Late')) late_enrolment,max(dropped) when_dropped
from (select unit,term,
case when status = 'ENROL'
then case when enrol_dte between term_start_dte and term_end_dte
then 'within'
else 'outside'
end
end enrolled,
case when status = 'DROP'
then case when enrol_dte < term_start_dte
then 'before start'
when enrol_dte < term_end_dte
then 'before end'
else 'after end'
end
end dropped
from dan_gr4
group by unit,term
order by unit,term
UNIT
TERM
LATE_ENROLMENT
WHEN_DROPPED
KIS
1
Late
after end
LIN
2
after end
LIN
4
Late
before end
POL
2
before end
POL
3
after end
POL
4
before end
PUI
3
after end
Regards
Etbin -
Use of semantic groups to aggregate data
In a number of threads - e.g. Semantic Groups in DTP it is stated that you cannot use semantic groups to aggregate data. In others, there are statements that this is only for handling the error stack.
This I find puzzling, as the SAP Help says:
+Choose Semantic Groups to specify how you want to build the data packages that are read from the source (DataSource or InfoProvider). To do this, define key fields. Data records that have the same key are combined in a single data package.
This setting is only relevant for DataStore objects with data fields that are overwritten. This setting also defines the key fields for the error stack. By defining the key for the error stack, you ensure that the data can be updated in the target in the correct order once the incorrect data records have been corrected.+
The experience of one of my clients is that you can indeed use Semantic Groups, and you do not need to define an error-DTP. ( Change the error handling on the Update tab to, e.g. "1 Valid Records Update, No Reporting" - then the key fields displayed after perssing the semantic group button become available ).
Any comments? Have I misunderstood the point that the others have been making?
mattHi Matt,
Semantic group is used to define the groupiing of records by data package. If you select 0PLANT as a Semantic group, each packet of data will contain all values of 0PLANT until the Max record is reach. Example, Package Size is set to 50K. If you have 30K of 0PLANT = 0002 and 22K of 0PLANT = 0003. First packet will contain 52K records of plant 0002 & 0003. The next packet will start with plant 0004 and will contain all records with 0004. If this doesn't make 50K records then plant 0005 will be included in packet 2.
Regards,
Dae Jin -
What's def of field group and intermediate data set
what's def of field group and intermediate data set
The drawing panel cannot draw the figures, what's
wrong?You can't have written this much code and then suddenly detected it doesn't work at all. You must now restart from the point where you had a working program. Then you add code is small increments and see to it that it works in each step and you understand why it works. This method is called stepwise refinement and it does wonders. -
Group By Like Dates????
does anyone know if there is a way to group by like dates?
so if there were 10 transaction records in a table, 5 in Oct and 5 in Nov. but not all transactions took place on the same day.
Eg:
DATE AMOUNT
15-OCT-02 1.50
16-OCT-02 115.00
17-NOV-02 200.00
24-NOV-02 99.00
and so on. is there a way i can group the dates together so i can get only one record for each month so it would look like this? i dont need the date displayed
AMOUNT
116.50
299.00
any help would be great
thanksthanks richard,
that worked great.
but i have one more question.
what i am doing is joining two tables by account number one holds the account_name and the other holds the transaction ammount, and i need to have the ammount displayed based on the month that the user inputs. but if there is no transaction for a given month it comes up no rows selected.
what i would like is to display the account name and if there is no transaction for a given month then have the ammount show 0.00. right now only the accounts that have transactions for the given month come up.
many thanks for any help -
How to get group when the data source from system instead of UME database
Hig guys,
How to get group when the data source comes from backend system instead of UME database?
I tried to use
IUMPrincipal RefGroup = WPUMFactory.getGroupFactory().getGroup(groupName);
But I was not able to get the group. But in "UserAdministrator", I can find this groupName.
Which kind of API can I use?
Thanks in advance!
Regards,
Liying
Message was edited by:
Liying WangOk,
try this:
com.sapportals.portal.security.usermanagement.IGroupFactory ep5GroupFactory = userManagementService.getGroupFactory();
IGroupFactory groupFactory = UMFactory.getGroupFactory();
com.sap.security.api.IGroup group = groupFactory.getGroupByUniqueName(groupName);
IUMPrincipal ep5Principal = ep5GroupFactory.getEP5Group(group);
This should do the trick,
Romano
PS: and thanks for the stars! -
Hi,
I recently got my macbook fixed through the apple store and the repairers replaced my hardrive, therefore wiping my computer of all its infor, including my Itunes library. Luckily, I had everything backed up on my time machine.
My question is how I can put back all my music into Itunes but also restore my data such as ratings, date added, and number of plays. Of course, I just want all my music back on my computer but stuff like this is what makes my library unique and personal to me. I enjoy listening to my music in order of when I downloaded them, bringing me back to specific experiences and times of my life where I enjoyed the group of songs, but I cannot do that when my Itunes has the "date added" of my songs all on the same date (the date that I'm putting my music back on).
Is there any way to take my itunes from library from my time machine and restore that back onto my itunes? (I've recently updated my Itunes too)
Please, anything helps!
Thanks!whosurBrendan wrote:
I was also previously having problems doing a full system restore from my most recent backup.
Depending on what kind of problems, they may be damaged.
Long story short, all I want to do is restore my Itunes and just the Itunes from where and what it was like before.
Have you already set up a user account? If so, you might be able to selectively restore your iTunes library from your backups, via the "Star Wars" display, per #15 in Time Machine - Frequently Asked Questions.
But the user account you've set up may not be recognized as the same one as on your backups; you may not have permission to view, much less restore, the library. -
Display all dates between date range (Time Dimension left outer join Fact)
All,
I have done some searching around this issue but within all the posts regarding date variables, date prompts and date filtering I haven't seen one exactly answering my issue (maybe they are and I just dont have my head around it correctly yet).
My report requirement is to allow a user to select a start day and an end day. The report should show all activity between those two days - AND display 0/null on days where there is no activity. That second part is where I am getting hung up.
The tables in question are:
TimeDim
EventFact
CustomerDim
My BMM is setup as follows:
TimeDim left outer join EventFact
CustomerDim inner join EventFact
If I run a report selecting DAY from TimeDim and a measure1 from EventFact with day range 1/1/2010 - 12/31/2010 .. I get a record for every day and it looks perfect because of the left outer join between TimeDim and CustomerDim.
But .. if I add in a field from CustomerDim, select TimeDim.DAY, CustomerDim.CUSTNAME, EventFact.MEASURE1, OBIEE only returns records for the days that have EventFact records.
This is due to the fact that the TimeDim is still outer joined into EventFact but adding in CustomerDim makes OBIEE setup an inner join between those tables which then causes only data to be returned where EventFact data exists.
There is a way around this in this simple case and that is to define the relationship between CustomerDim and EventFact as an outer join as well. This will give the desired effect (but an outer join between these two tables is not the true relationship) and as I add additional dimensions and add additional logical sources to a single dimension in the BMM it gets complicated and messy.
Ive also messed with setting the driving table in the relationship, etc.. but it has not given the desired effect.
Has anyone ever encountered the need to force display all dates within a specfied range with a fact table that may not have an entry for every date?
Thanks in advance.
K
Edited by: user_K on Apr 27, 2010 11:32 AMIt worked!!!* Even my time drill downs and date based filtering still work!
That is awesome. Never would have thought of that intuitively.
Now, just need a little help understanding how it works. When I run my report and check the logs I can see that two queries are issued:
Query 1: Joins the fact table to all the associated dimensions. I even changed all the relationships to inner joins (which is what they truly are). And calculates the original measure. If I copy and paste this query into sql developer it runs fine but only returns those rows that joined to the time dimension - which is what was happening before. It is correct but I wanted a record for every time dimension record.
Query 2: Looks like the following:
select sum(0)
from timedim
where date between <dateprompt1> and <dateprompt2>
group by month *<--* this is the time dimension level specified in Query 1, so it knows to aggregate to the month level as was done in query 1
Final Question: So what is OBIEE doing ultimately, does it issue these two requests and then perform a full outer join or something to bring them together? I couldn't see anywhere in the log a complete query that I could just run to see a similar result that I was getting in Answers.
Thanks for all the help .. Id give more points if I could.
K
Maybe you are looking for
-
FCP 5.0.4 won't render all tracks.
FCP 5.0.4 fails to render all of my tracks. There are three, and in some places, four video tracks. It only renders the third and fourth tracks. Plays fine in the timeline but will not output in any format. Audio is fine. Video is all black except wh
-
HT1212 Password preventing me transfering data from my old iphone to my new one?
I've just upgraded my iPhone to the 5. I've backed the old phone up to iTunes but its asking for a password to unlock the backed up phone. How do i get in??!!
-
Downloading data from report painter report in background
Hi Guy, I have a requirement where in have to schedule the job and download the data on application server from report which is been written report writter. there is an option to save the export paramater but i can download it only in forground. Any
-
Document already exist error for our user screen
Hi All, In SAP 2007 PL 13,after Removing record by right click remove ,I am not able to add the document. It gives error "Document no already exist". After diagnosis Of ONNM and NNM1 table ,I got that next no does not increases in NNM1and
-
What is the best way to detect loss of OPC Server connection when using DSC Tags?
I'm using the DSC Module on a new project and I'm pretty impressed so far. The HMI Wizard has saved me quite a bit of time. My application is configured where the DSC Tags are connected to remote OPC Server Tags. The issue I'm having is that I cannot