SQL help: return number of records for each day of last month.
Hi: I have records in the database with a field in the table which contains the Unix epoch time for each record. Letz say the Table name is ED and the field utime contains the Unix epoch time.
Is there a way to get a count of number of records for each day of the last one month? Essentially I want a query which returns a list of count (number of records for each day) with the utime field containing the Unix epoch time. If a particular day does not have any records I want the query to return 0 for that day. I have no clue where to start. Would I need another table which has the list of days?
Thanks
Ray
Peter: thanks. That helps but not completely.
When I run the query to include only records for July using a statement such as following
============
SELECT /*+ FIRST_ROWS */ COUNT(ED.UTIMESTAMP), TO_CHAR((TO_DATE('01/01/1970','MM/DD/YYYY') + (ED.UTIMESTAMP/86400)), 'MM/DD') AS DATA
FROM EVENT_DATA ED
WHERE AGENT_ID = 160
AND (TO_CHAR((TO_DATE('01/01/1970','MM/DD/YYYY')+(ED.UTIMESTAMP/86400)), 'MM/YYYY') = TO_CHAR(SYSDATE-15, 'MM/YYYY'))
GROUP BY TO_CHAR((TO_DATE('01/01/1970','MM/DD/YYYY') + (ED.UTIMESTAMP/86400)), 'MM/DD')
ORDER BY TO_CHAR((TO_DATE('01/01/1970','MM/DD/YYYY') + (ED.UTIMESTAMP/86400)), 'MM/DD');
=============
I get the following
COUNT(ED.UTIMESTAMP) DATA
1 07/20
1 07/21
1 07/24
2 07/25
2 07/27
2 07/28
2 07/29
1 07/30
2 07/31
Some dates donot have any records and so no output. Is there a way to show the missing dates with a COUNT value = 0?
Thanks
Ray
Similar Messages
-
I need a query that selects the amount of records for each day in a table.
I need a query that selects the amount of records for each
day in a table.
Eg the result would be:
date 1 14
date 2 3
etc
Any ideas?sorted:
SELECT count([commentID]),convert(varchar, dateAdded, 112)
FROM COMMENTSgroup by convert(varchar, dateAdded,
112) -
Join two tables, return max 1 record for each left
I want to join tables A and B, but I only want to return a maximum of one record for each record on the left. For example
Table A
Bob,1
John,2
Jill,3
Table B
1,MountainTime
1,MountainTime
2,CentralTime
3,PacificTime
Result
Bob,MountainTime
John,CentralTime
Jill,PacificTimeHi Andrew,
Create a report by joining two tables and insert a group on code(1) and place your fields on goup footer.
This will give only one record.
Thanks,
Sastry -
Query to get a value for each day in a month
Hi All,
I'm needing a query (preferably without a loop or function) that can get a number representing each day of a given month.
For example for the month of February, the result would be 1,2,3,....28
Surely this can be done?
Thanks!SQL> with a as (
2 select trunc(sysdate,'Month') mon from dual)
3 SELECT mon + LEVEL - 1 AS dates
4 FROM a
5 CONNECT BY LEVEL <= ADD_MONTHS (mon, 1) - mon;
DATES
01-FEB-11
02-FEB-11
03-FEB-11
04-FEB-11
05-FEB-11
06-FEB-11
07-FEB-11
08-FEB-11
09-FEB-11
10-FEB-11
11-FEB-11
DATES
12-FEB-11
13-FEB-11
14-FEB-11
15-FEB-11
16-FEB-11
17-FEB-11
18-FEB-11
19-FEB-11
20-FEB-11
21-FEB-11
22-FEB-11
DATES
23-FEB-11
24-FEB-11
25-FEB-11
26-FEB-11
27-FEB-11
28-FEB-11
28 rows selected.or if u want it in one query,Then
SQL> SELECT trunc(sysdate,'Month') + LEVEL - 1 AS dates
2 FROM dual
3 CONNECT BY LEVEL <= ADD_MONTHS (trunc(sysdate,'Month'), 1) - trunc(sysdate,'Month');
DATES
01-FEB-11
02-FEB-11
03-FEB-11
04-FEB-11
05-FEB-11
06-FEB-11
07-FEB-11
08-FEB-11
09-FEB-11
10-FEB-11
11-FEB-11
DATES
12-FEB-11
13-FEB-11
14-FEB-11
15-FEB-11
16-FEB-11
17-FEB-11
18-FEB-11
19-FEB-11
20-FEB-11
21-FEB-11
22-FEB-11
DATES
23-FEB-11
24-FEB-11
25-FEB-11
26-FEB-11
27-FEB-11
28-FEB-11
28 rows selected.
SQL> Regards
Umesh -
How do I create a chart of the number of entries for each date?
I have a table which contains bookings for an event I am running, with one row for each booking and a column for the date of the booking. I am trying to create a line chart which shows me the progress of the number of bookings over time. So the X axis would have one label for each day of the month - even if there was no booking on that day, and the Y axis would have the number of bookings, i.e. the number of rows, matching the date.
I have tried a few things without success, so I wonder if someone could help with this?
Thanks,
NickThe top table is titled "Bookings" and the bottom table summariese the bookings by counting how many bookings fall on each day:
The bottom table:
B2=COUNTIF(Bookings :: $B, "="&A2)
select B2 and fill down as needed -
Select last value for each day from table
Hi!
I have a table that stores several measures for each day. I need two queries against this table and I am not quite sure how to write them.
The table stores these lines (sample data)
*DateCol1 Value Database*
27.09.2009 12:00:00 100 DB1
27.09.2009 20:00:00 150 DB1
27.09.2009 12:00:00 1000 DB2
27.09.2009 20:00:00 1100 DB2
28.09.2009 12:00:00 200 DB1
28.09.2009 20:00:00 220 DB1
28.09.2009 12:00:00 1500 DB2
28.09.2009 20:00:00 2000 DB2Explanation of data in the sample table:
We measure the size of the data files belonging to each database one or more times each day. The value column shows the size of the database files for each database at a given time (European format for date in DateCol1).
What I need:
Query 1:
The query should return the latest measurement for each day and database. Like this:
*DateCol1 Value Database*
27.09.2009 150 DB1
27.09.2009 1100 DB2
28.09.2009 220 DB1
28.09.2009 2000 DB2Query 2:
The query should return the average measurement for each day and database. Like this:
*DateCol1 Value Database*
27.09.2009 125 DB1
27.09.2009 1050 DB2
28.09.2009 210 DB1
28.09.2009 1750 DB2Could someone please help me to write these two queries?
Please let me know if you need further information.
Edited by: user7066552 on Sep 29, 2009 10:17 AM
Edited by: user7066552 on Sep 29, 2009 10:17 AMFor first query you can use analytic function and solve it.
with t
as
select to_date('27.09.2009 12:00:00', 'dd.mm.yyyy hh24:mi:ss') dt, 100 val, 'DB1' db from dual union all
select to_date('27.09.2009 20:00:00', 'dd.mm.yyyy hh24:mi:ss'), 150, 'DB1' from dual union all
select to_date('27.09.2009 12:00:00', 'dd.mm.yyyy hh24:mi:ss'), 1000, 'DB2' from dual union all
select to_date('27.09.2009 20:00:00', 'dd.mm.yyyy hh24:mi:ss'), 1100, 'DB2' from dual union all
select to_date('28.09.2009 12:00:00', 'dd.mm.yyyy hh24:mi:ss'), 200, 'DB1' from dual union all
select to_date('28.09.2009 20:00:00', 'dd.mm.yyyy hh24:mi:ss'), 220, 'DB1' from dual union all
select to_date('28.09.2009 12:00:00', 'dd.mm.yyyy hh24:mi:ss'), 1500, 'DB2' from dual union all
select to_date('28.09.2009 20:00:00', 'dd.mm.yyyy hh24:mi:ss'), 2000, 'DB2' from dual
select dt, val, db
from (
select row_number() over(partition by trunc(dt), db order by dt) rno,
count(*) over(partition by trunc(dt), db) cnt,
t.*
from t)
where rno = cntFor second you can just group by
with t
as
select to_date('27.09.2009 12:00:00', 'dd.mm.yyyy hh24:mi:ss') dt, 100 val, 'DB1' db from dual union all
select to_date('27.09.2009 20:00:00', 'dd.mm.yyyy hh24:mi:ss'), 150, 'DB1' from dual union all
select to_date('27.09.2009 12:00:00', 'dd.mm.yyyy hh24:mi:ss'), 1000, 'DB2' from dual union all
select to_date('27.09.2009 20:00:00', 'dd.mm.yyyy hh24:mi:ss'), 1100, 'DB2' from dual union all
select to_date('28.09.2009 12:00:00', 'dd.mm.yyyy hh24:mi:ss'), 200, 'DB1' from dual union all
select to_date('28.09.2009 20:00:00', 'dd.mm.yyyy hh24:mi:ss'), 220, 'DB1' from dual union all
select to_date('28.09.2009 12:00:00', 'dd.mm.yyyy hh24:mi:ss'), 1500, 'DB2' from dual union all
select to_date('28.09.2009 20:00:00', 'dd.mm.yyyy hh24:mi:ss'), 2000, 'DB2' from dual
select trunc(dt) dt, avg(val) val, db
from t
group by trunc(dt), db
order by trunc(dt) -
Pulling records where number of records for unique ID = 6
I have a table that contains address information for everyone in the system. It has numerous fields, though I've only included a few in the create table query below for the sake of brevity. The PIDM uniquely identifies each record as belonging to a particular person in the database. A person can have multiple addresses in the table, though we normally do not allow them to have more than one active address of a particular ATYP_CODE. Again, I am doing this here for the sake of brevity. What I need to do is pull all the records for each PIDM, but only where there are >= 6 records per PIDM. The user doesn't care if the data are pivoted (I can do that part if needed). Pulling the actual data isn't the issue. I just need a little help figuring out how to get only the records of PIDMs with six or more records in the table. So, from the example data below, the records for PIDM 12345 and 34567 are the ones that should be in the output, but the ones from PIDM 23456 should not.
DROP TABLE SPRADDR;
CREATE TABLE SPRADDR
(PIDM NUMBER(8),
ATYP_CODE VARCHAR2(2 CHAR),
STREETLINE1 VARCHAR2(60 CHAR),
CITY VARCHAR2(60 CHAR),
STATE VARCHAR2(2 CHAR),
ZIP VARCHAR2(10));
INSERT INTO SPRADDR VALUES (12345,'PR','1 MAIN','CANFIELD','OH','44406');
INSERT INTO SPRADDR VALUES (12345,'MA','1 MAIN','CANFIELD','OH','44406');
INSERT INTO SPRADDR VALUES (12345,'BU','1 MAIN','CANFIELD','OH','44406');
INSERT INTO SPRADDR VALUES (12345,'PR','2 MAIN','CANFIELD','OH','44406');
INSERT INTO SPRADDR VALUES (12345,'MA','3 MAIN','CANFIELD','OH','44406');
INSERT INTO SPRADDR VALUES (12345,'PR','4 MAIN','CANFIELD','OH','44406');
INSERT INTO SPRADDR VALUES (23456,'PR','1 MAIN','KENT','OH','44240');
INSERT INTO SPRADDR VALUES (23456,'MA','1 MAIN','KENT','OH','44240');
INSERT INTO SPRADDR VALUES (23456,'BU','1 MAIN','KENT','OH','44240');
INSERT INTO SPRADDR VALUES (34567,'PR','1 MAIN','CANFIELD','OH','44406');
INSERT INTO SPRADDR VALUES (34567,'MA','1 MAIN','CANFIELD','OH','44406');
INSERT INTO SPRADDR VALUES (34567,'BU','1 MAIN','CANFIELD','OH','44406');
INSERT INTO SPRADDR VALUES (34567,'PR','2 MAIN','CANFIELD','OH','44406');
INSERT INTO SPRADDR VALUES (34567,'MA','3 MAIN','CANFIELD','OH','44406');
INSERT INTO SPRADDR VALUES (34567,'PR','4 MAIN','CANFIELD','OH','44406');
INSERT INTO SPRADDR VALUES (34567,'PR','6 MAIN','CANFIELD','OH','44406');
COMMIT;I'd greatly appreciate any help you might be able to provide. I'm sure this is easy, but what I've done so far has not worked and I'm not including the code I tried because it's totally cockeyed and not working at all.
Thanks,
Michelle Craig
Data Coordinator
Admissions Operations and Transfer Systems
Kent State UniversityPIDM 12345 and 34567 are the ones that should.Why 12345? It is repeated 6 times where you asked for > 6. Anyway:
SQL> select *
2 from (
3 select s.*,
4 count(*) over(partition by pidm) cnt
5 from spraddr s
6 )
7 where cnt > 6
8 order by pidm
9 /
PIDM AT STREETLINE1 CITY ST ZIP CNT
34567 PR 1 MAIN CANFIELD OH 44406 7
34567 MA 1 MAIN CANFIELD OH 44406 7
34567 BU 1 MAIN CANFIELD OH 44406 7
34567 PR 2 MAIN CANFIELD OH 44406 7
34567 MA 3 MAIN CANFIELD OH 44406 7
34567 PR 4 MAIN CANFIELD OH 44406 7
34567 PR 6 MAIN CANFIELD OH 44406 7
7 rows selected.
SQL> select *
2 from (
3 select s.*,
4 count(*) over(partition by pidm) cnt
5 from spraddr s
6 )
7 where cnt >= 6
8 order by pidm
9 /
PIDM AT STREETLINE1 CITY ST ZIP CNT
12345 PR 1 MAIN CANFIELD OH 44406 6
12345 MA 1 MAIN CANFIELD OH 44406 6
12345 BU 1 MAIN CANFIELD OH 44406 6
12345 PR 2 MAIN CANFIELD OH 44406 6
12345 MA 3 MAIN CANFIELD OH 44406 6
12345 PR 4 MAIN CANFIELD OH 44406 6
34567 PR 1 MAIN CANFIELD OH 44406 7
34567 MA 1 MAIN CANFIELD OH 44406 7
PIDM AT STREETLINE1 CITY ST ZIP CNT
34567 BU 1 MAIN CANFIELD OH 44406 7
34567 PR 2 MAIN CANFIELD OH 44406 7
34567 MA 3 MAIN CANFIELD OH 44406 7
34567 PR 4 MAIN CANFIELD OH 44406 7
34567 PR 6 MAIN CANFIELD OH 44406 7
13 rows selected.
SQL> SY.
Edited by: Solomon Yakobson on May 10, 2012 10:02 AM -
Using pl/sql function for each day between two dates.
Hi,
create TABLE EMP(
ID_EMP NUMBER,
DT_FROM DATE,
DT_TO DATE,
CREATE_DATE DATE);
into EMP(ID_EMP, DT_FROM, DT_TO, CREATE_DATE)
Values(100, TO_DATE('07/01/2008 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('04/30/2010 00:00:00', 'MM/DD/YYYY HH24:MI:SS'),TO_DATE('05/08/2009 14:11:21', 'MM/DD/YYYY HH24:MI:SS'));
I have a function called elig_pay_dates(date p_date), which returns the code for person payment eligibility for a particular date. For paid dates it's 'P' and for unpaid dates it's 'N'.
How can I check this function between two dates for each day. Example : 07/01/2008 to 04/30/2010.
By using this function with select I needs to display the dates when there is a change in status.
I am expecting data in following manner from above logic(this is example):
07/01/2008 --- 07/01/2009 ---'P'
07/02/2009 -- 07/25/2009 ----'N'
07/26/2009 -- 01/01/2010 ---'P'
01/02/2010 -- 01/13/2010 --'N'
01/14/2010 -- 01/18/2010 --'P'
01/19/2010 -- 04/30/2010 -- 'N'
I thought of looping for each day date but that seems to be expensive for online application. Is there any way that I can achieve this requirement with sql query ?
Thanks for your help,Certainly not the best way to code the requirement, but it does achieve the result you are looking for in a fairly quick time
create or replace
function test_ret_paid_unpaid (p_date in date)
return varchar2
is
v_ret varchar2(1);
begin
if ( (p_date between to_date('07/02/2009', 'MM/DD/YYYY') and to_date('07/25/2009', 'MM/DD/YYYY') ) or
(p_date between to_date('01/02/2010', 'MM/DD/YYYY') and to_date('01/13/2010', 'MM/DD/YYYY') ) or
(p_date between to_date('01/19/2010', 'MM/DD/YYYY') and to_date('04/30/2010', 'MM/DD/YYYY') )
then v_ret := 'N';
else
v_ret := 'Y';
end if;
return v_ret;
end;
Wrote file afiedt.buf
1 with get_paid_unpaid as
2 (
3 select dt_from start_date, dt_to end_date, dt_from + level - 1 curr_date, test_ret_paid_unpaid(dt_from + level - 1) paid_unpaid,
4 row_number() over (order by dt_from + level - 1) rn_start,
5 row_number() over (order by dt_from + level - 1 desc) rn_end
6 from test_emp
7 connect by level <= dt_to - dt_from + 1
8 ),
9 get_stop_date as
10 (
11 select start_date init_date, end_date, curr_date, paid_unpaid,
12 case when paid_unpaid != lag(paid_unpaid) over (order by curr_date) or rn_start = 1 or rn_end = 1
13 then curr_date
14 else null
15 end start_date,
16 case when paid_unpaid != lead(paid_unpaid) over (order by curr_date) or rn_start = 1 or rn_end = 1
17 then curr_date
18 else null
19 end stop_date
20 from get_paid_unpaid
21 )
22 select period, paid_unpaid
23 from (
24 select init_date, curr_date, start_date, end_date, stop_date,
25 case when paid_unpaid = lead(paid_unpaid) over (order by curr_date)
26 then nvl(start_date, init_date) || ' - ' || lead(stop_date, 1, end_date) over (order by curr_date)
27 else null
28 end period,
29 paid_unpaid
30 from get_stop_date
31 where stop_date is not null or start_date is not null
32 )
33* where period is not null
12:06:10 SQL> /
PERIOD PAID_UNPAID
01-JUL-08 - 01-JUL-09 Y
02-JUL-09 - 25-JUL-09 N
26-JUL-09 - 01-JAN-10 Y
02-JAN-10 - 13-JAN-10 N
14-JAN-10 - 18-JAN-10 Y
19-JAN-10 - 30-APR-10 N
6 rows selected.
Elapsed: 00:00:00.35 -
Number of records in each partition
Hi,
Can any one please tell me, how to display number of record in each partion in any table.
I wanted to use following in PL/SQL but it gives me error.
Declare
Cursor c1 is
select partition_name into part_name from all_tab_partition where table_name = 'table_name';
BEGIN
for rec in c1
Loop
select count(*) into temp_var from table_name partition(rec.part_name)
END LOOP;
END;
I guess I need dynamic SQL ..
Any thoughts on this ??
Thanks,
AvIt is always better to analyze the tables and get these details from num_rows as mentioned before but just in case you want the latest information from the table dynamically then use the following
Declare
Cursor c1 is
select table_name,partition_name from all_tab_partitions where table_name = 'SALESDETAILS';
v_sql varchar2(2000);
temp_var number:=0;
BEGIN
for rec in c1
Loop
execute immediate 'select count(*) from '||rec.table_name||' partition('||rec.partition_name||')' into temp_var;
dbms_output.put_line('The Partition '||rec.partition_name||' of table '||rec.table_name||' has '||temp_var||' rows');
END LOOP;
END; -
Select one record for each member of the group
Hi,
am having a table where in i will be having data for so many group members. i need to fetch data for a particular group members whose number of rows of data may be more in numbers (but i want only one row of data for each member of the group)
here is the query for fetching all rows of data
select RI.RESOURCE_NAME,TR.MSISDN,TR.ADDRESS1_GOOGLE, TR.MSG_DATE_INFO, FROM TRACKING_REPORT TR, RESOURCE_INFO RI
WHERE TR.MSISDN IN (SELECT MSISDN FROM RESOURCE_INFO WHERE GROUP_ID ='1' AND COM_ID=2 ) AND RI.MSISDN=TR.MSISDN
order by MSG_DATE_INFOoutput of this query is...
>
ddd 12345 13-Mar-10 19:43:03
eee 54321 Tamil Nadu, India 13-Mar-10 19:39:48
ddd 12345 13-Mar-10 19:32:58
eee 54321 Tamil Nadu, India 13-Mar-10 19:30:07
ddd 12345 13-Mar-10 19:23:08
eee 54321 Tamil Nadu, India 13-Mar-10 19:20:14
fff 98765 13-Mar-10 19:19:22
ddd 12345 13-Mar-10 19:13:01
eee 54321 Tamil Nadu, India 13-Mar-10 19:09:50
ddd 12345 13-Mar-10 19:02:56
eee 54321 tn,ind 13-Mar-10 18:59:49
ddd 12345 13-Mar-10 18:53:08
eee 54321 tn,ind 13-Mar-10 18:49:50
ddd 12345 13-Mar-10 18:42:56
eee 54321 tn,ind 13-Mar-10 18:39:50
ddd 12345 13-Mar-10 18:33:00
eee 54321 tn,ind 13-Mar-10 18:29:50
ddd 12345 13-Mar-10 18:22:54
eee 54321 tn,ind 13-Mar-10 18:19:50
ddd 12345 13-Mar-10 18:12:56
eee 54321 tn,ind 13-Mar-10 18:09:50
ddd 12345 13-Mar-10 18:02:54
eee 54321 tn,ind 13-Mar-10 18:00:02
fff 98765 Tamil Nadu, India 13-Mar-10 17:59:26
fff 98765 Tamil Nadu, India 13-Mar-10 17:54:26
ddd 12345 13-Mar-10 17:52:56
eee 54321 tn,ind 13-Mar-10 17:49:50
fff 98765 Tamil Nadu, India 13-Mar-10 17:49:25
fff 98765 Tamil Nadu, India 13-Mar-10 17:44:26
ddd 12345 13-Mar-10 17:42:56
>
from this output i want only one latest record for each member(ddd,eee,fff). i.e
>
ddd 12345 13-Mar-10 19:43:03
eee 54321 Tamil Nadu, India 13-Mar-10 19:39:48
fff 98765 13-Mar-10 19:19:22
>
how to modify the query to achieve this...?Hi,
This is not giving the result which i want...
table is
CREATE TABLE TRACKING_REPORT
ID NUMBER,
MSISDN NUMBER(12) NOT NULL,
X NUMBER(15,8) NOT NULL,
Y NUMBER(15,8) NOT NULL,
TIME_STAMP DATE,
MSG_DATE_INFO DATE DEFAULT sysdate,
ADDRESS1_GOOGLE VARCHAR2(400 BYTE),
ADDRESS2_GOOGLE VARCHAR2(400 BYTE),
ADDRESS_MLINFO VARCHAR2(400 BYTE),
REQ_ID VARCHAR2(30 BYTE)
CREATE TABLE RESOURCE_INFO
RESOURCE_ID NUMBER,
MSISDN NUMBER,
RESOURCE_NAME VARCHAR2(25 BYTE),
ADDRESS VARCHAR2(100 BYTE),
COM_ID VARCHAR2(20 BYTE),
ADMIN_ID NUMBER,
TIME_STAMP DATE DEFAULT SYSDATE,
GROUP_ID NUMBER
) -
NUMBER OF RECORDS IN EACH TABLE???
Hi!
how can i find the number of records in each table in the database. the result should be like this
table_1 123
table_2 60
table_3 88
thanks!!
also if we want to see it only for a particular schema???You can get all the table names and schemas from ALL_TABLES table.
then you can stored that on a cursor,
then you can create a function where you use an execute_immediate to run the queries dinamically. with that you can run a COUNT for each TABLE
That's the idea give it a shot :)
Regards -
When we drilldown at document level it displays one record for each cube
Dear Experts .
The users want to see the report by status for the order detail report at document level it displays one record for each cube .
They want to see the single line for the order quantity , Amount, Billing quantity delivery and amount along with the Sales order number , billing document number billing date , delvert date ..et in signgle line. ( Sale order DeliveryBilling)
When we are doing on Multiprovider recording displaying from each cube.
We have tried with Constant selections and it is not giving the required results m since these want to see by status. Due to huge data performance reasons we re unable to use it .
Please provide your valuable inputs.
Thanks,
Mahesh.Mahesh,
If you want to get detail data with respect to Sales order - delivery - Billing, on top of Multiprovider you can come up with Constant selection.
But I am not clear that why constant selection is not working properly, can I have some light on that.
Probably, you are struggling with multiple records .
I suggest you to go with end routine and map all fields to one IC and do reporting on that single IC, then your requirement will fulfill.
But here we need to take care of performance issues and process chain scheduling wile loading deltas.
If Multiprovider is not working properly , then try with Infoset(If you have more than 2 ICs it not possible).
Regards,
rvc -
Loading the cube from 3 datasources and getting 3 records for each keyfield
Hi All,
I am loading an InfoCube from 3 separated datasources. These 3 datasources are UD Datasources and their unique source system is UD Connect.
Each of the datasource contains a unique key field 'Incident Number' (same as we use have in Datasources for DSO).
The problem is, when I am loading data with these 3 datasources to the cube, for each 'Incident number' there becomes 3 records.
We have reports on this Infocube and the report also displays 3 records for each incident number.
If I remove Incident Number key field from 2 of the Datasources, the data from these datasources do not reach to the Cube.
For many of you, this may be a minor problem ( or may not be a problem at all !!! ) , but as a New Joinee in SAP field, this has become a showstopper issue for me.
Please suggest.
Thanks in Advance.Hi Pravender,
Thanks for your interest.
The scenario is, I have 3 datasources form the same source system, All the 3 datasources have different fields except 'Incident Number'. So, each and every field has only one value in the report. But due to 3 separate datasources, it creates 3 records displahying values of each datasource in a separate record.
There is no field in the query output which is having different values for the different source systems. Due to 3 records in the cube, one record will contain the value for a particular field and the other two records will show a Blank for that field.
Regards. -
Create standby maximum number of logfiles for each thread
The oracle doc states this equation for appropriate number of standby redo log file groups
(maximum number of logfiles for each thread +1) * maximum number of threads
How do you get the maximum number of logfiles for each thread and the max thread?
Thanks!If you are running RAC you can, in theory, be running with a diferent count
of Online Redo Logs in each thread (instance).
However, normally, you would have the same number of Redo Logs in each
thread.
The theoretical max is prescribed at the CREATE DATABASE and can be
changed with a CREATE CONTROLFILE. If you do an
ALTER DATABASE BACKUP CONTROLFILE TO TRACE
the sql script in the tracefile shows the maximum number of logs and members. -
Maximum number of logfiles for each thread
Hi all,
When I configure a Standby Redo Log, to determine the appropriate number of standby redo log file groups, I should use the following formula:
appropriate number of standby redo log file groups: (maximum number of logfiles for each thread + 1) * maximum number of threads
My question is: how can I determine the maximum number of logfiles for each thread ? Is it the online redo log file per group? or total of redo log files in all groups?
SQL> ed
Wrote file afiedt.buf
1* select group#, thread#, sequence#, members from v$log
SQL> /
GROUP# THREAD# SEQUENCE# MEMBERS
1 1 40 1
2 1 38 1
3 1 39 1user8994263 wrote:
Hi,
If you have 5 redo log groups on primary, do you suggest to create 6 standby redo log groups on standby?
If yes, why ?
-KalidasYou did two mistakes
1) Responded to old question Posted: Jun 1, 2010 8:52 PM
2) Its not your question & asking into others threads.
-- Please lock this thread
Maybe you are looking for
-
FM to calculate Number of working days adjusted for an employee -ABAP HR
I have one requirement in which i have to Calculate "Number of working days adjusted" for an employee for a disability program. In this context i wanna know, if just get difference between two dates (i.e the duration for which employee was compensate
-
Sun's JDK 1.3.0_02 hangs on RedHat 7.1
I am trying to install Oracle 8.1.7 on Linux RedHat 7.1. This time, my problem is that the script runInstaller freezes and nothing happens. I am using JDK 1.3.0_02 from Sun. What version of Java should I use? Did Anyone install Oracle on RedHat 7.1?
-
Good evening, I have been asked to take over a website. Whomever designed it used an applet at the bottom of the index.htm that displays a button that when pressed displays a *.png image in a new browser window. <APPLET codeBase=./ height=24 width=37
-
Using 3rd party application to get itune songs from PC to MacBook
Until Dec. my iTunes account was on my PC. I had downloaded 1200 songs from a friends hard drive into the itunes account and then into my iPod. I no longer use the PC and now have a MacBook where I have set up my iTunes account. I want to add new son
-
I want to rename a file in my C:/ machine (localhost) using Abap functions. Is there any way to do it ?? Thanks in advance.