Need help to add totals and subtotals query that uses ROW_NUMBER OVER()

Hi all

We have the following query that is used in a report that generates a list of employees working a certain type of movement.
The report also includes a column called RN that is used when the pagination for the report.
What we are trying to do now is to add columns that indicate the total number of hours worked by the employee as well as gran total of hours of work for all employees in the report.

We tried to add the columns last week and have been able to get the totals by using a group by clause. Only problem is that it has changed the order of the column of RN.
The RN column must stay in numerical order, since we need to select and display the records for paging.

Is it possible to get our totals without disturbing our paging RN column?

BTW, thanks Frank for the addition of the UNPIVOT operator at our request. While other solutions worked, UNPIVOT has been the most effective.

SEE below, the application and all the sql to create tables and test data.

Thank you
George
SELECT *
  FROM (SELECT COUNT (*) OVER () record_count,
               ROW_NUMBER ()
               OVER (
                  ORDER BY
                     e.lname || ', ' || e.fname || ' - ' || e.initials DESC,
                     u.startdate DESC)
                  rn,
               u.empid,
               a.area,
               e.lname,
               e.fname,
               e.initials,
               u.startdate,
               u.starttime,
               u.endtime,
               u.hours,
               u.minutes
          FROM ((SELECT empid,
                        startpp + day_number - 1 startdate,
                        NULL starttime,
                        NULL endtime,
                        8 hours,
                        0 minutes
                   FROM    schedules s
                        JOIN
                           payperiods pp
                        ON pp.periodid = s.periodid 
UNPIVOT ( v 
FOR day_number IN (day1 AS 1
                  ,day2 AS 2
                  ,day3 AS 3
                  ,day4 AS 4
                  ,day5 AS 5
                  ,day6 AS 6
                  ,day7 AS 7
                  ,day8 AS 8
                  ,day9 AS 9
                  ,day10 AS 10
                  ,day11 AS 11
                  ,day12 AS 12
                  ,day13 AS 13
                  ,day14 AS 14)
         ) 
         WHERE SUBSTR (v, 1, 4) = 'SHFT' 
         UNION 
SELECT l.empid,
       l.startdate,
       TO_CHAR (l.starttime, 'HH24:MI'),
       TO_CHAR (l.endtime, 'HH24:MI'),
       TRUNC (
            24
          * (CASE
                WHEN l.starttime > l.endtime THEN l.endtime + 1 - l.starttime
                ELSE l.endtime - l.starttime
             END))
          hours,
       FLOOR (
            (  ( (l.endtime - l.starttime) * 24 * 60 * 60)
             -   FLOOR ( ( (l.endtime - l.starttime) * 24 * 60 * 60) / 3600)
               * 3600)
          / 60)
          minutes
  FROM leavereq l
 WHERE     UPPER (l.leavetype) = 'XYZShift'
       AND l.starttime IS NOT NULL
       AND approval = -1
       AND canceled = 0
) U) 
JOIN employee e ON e.empid = u.empid 
JOIN areas a ON a.areaid = e.areaid 
WHERE a.configid = 1000 
AND (startdate between to_date('4/7/2013','mm/dd/yyyy') and to_date('4/20/2013','mm/dd/yyyy')) 
ORDER BY e.lname||', '||e.fname||' - '||e.initials DESC ,u.startdate DESC 
) WHERE rn BETWEEN 1 AND 75 
order by rn;
--------------------------------------------------------------------------------
OUTPUT CURRENT
RECORD_COUNT,RN,EMPID,AREA,LNAME,FNAME,INITIALS,STARTDATE,STARTTIME,ENDTIME,HOURS,MINUTES
12,1,753948,TEST,Three,Employee,E3,4/17/2013,,,8,0
12,2,753948,TEST,Three,Employee,E3,4/15/2013,,,8,0
12,3,753948,TEST,Three,Employee,E3,4/12/2013,08:00,12:30,4,30
12,4,753948,TEST,Three,Employee,E3,4/8/2013,,,8,0
12,5,753940,TEST,Two,Employee,E2,4/12/2013,08:00,13:45,5,45
12,6,753940,TEST,Two,Employee,E2,4/11/2013,,,8,0
12,7,753940,TEST,Two,Employee,E2,4/9/2013,,,8,0
12,8,753940,TEST,Two,Employee,E2,4/8/2013,,,8,0
12,9,753938,TEST,One,Employee,O1,4/17/2013,,,8,0
12,10,753938,TEST,One,Employee,O1,4/12/2013,08:00,14:20,6,20
12,11,753938,TEST,One,Employee,O1,4/9/2013,,,8,0
12,12,753938,TEST,One,Employee,O1,4/8/2013,,,8,0
DESIREE OUTPUT
RECORD_COUNT,RN,EMPID,AREA,LNAME,FNAME,INITIALS,STARTDATE,STARTTIME,ENDTIME,HOURS,MINUTES,EMPTOTAL,GRANTOTAL
12,1                 ,753948,TEST,Three,Employee,E3       ,4/17/2013   ,               ,             ,8        ,0           ,28:30         ,88:35
12                    ,2,753948,TEST,Three,Employee,E3       ,4/15/2013   ,               ,             ,8        ,0           ,28:30         ,88:35
12                    ,3,753948,TEST,Three,Employee,E3       ,4/12/2013   ,08:00       ,12:30     ,4        ,30         ,28:30         ,88:35
12                    ,4,753948,TEST,Three,Employee,E3       ,4/8/2013     ,               ,             ,8        ,0           ,28:30         ,88:35
12                    ,5,753940,TEST,Two,Employee,E2         ,4/12/2013   ,08:00       ,13:45     ,5        ,45         ,29:45         ,88:35
12                    ,6,753940,TEST,Two,Employee,E2         ,4/11/2013   ,               ,             ,8        ,0           ,29:45         ,88:35
12                    ,7,753940,TEST,Two,Employee,E2         ,4/9/2013     ,               ,             ,8        ,0           ,29:45         ,88:35
12                    ,8,753940,TEST,Two,Employee,E2         ,4/8/2013     ,               ,             ,8        ,0           ,29:45         ,88:35
12                    ,9,753938,TEST,One,Employee,O1         ,4/17/2013   ,               ,             ,8        ,0           ,30:20         ,88:35
12                    ,10,753938,TEST,One,Employee,O1       ,4/12/2013   ,08:00       ,14:20     ,6        ,20         ,30:20          ,88:35
12                    ,11,753938,TEST,One,Employee,O1       ,4/9/2013     ,               ,             ,8        ,0           ,30:20          ,88:35
12                    ,12,753938,TEST,One,Employee,O1       ,4/8/2013     ,               ,             ,8        ,0           ,30:20          ,88:35
--------------------------------------------------------------------------------
CREATE THE TABLE PROGRAMS
(
SCHEDULEID NUMBER (12) NOT NULL,
EMPID NUMBER (12) NOT NULL,
PERIODID VARCHAR2 (6 BYTE) NOT NULL,
AREAID NUMBER (12) NOT NULL,
DAY1 VARCHAR2 (50 BYTE),
DAY 2 VARCHAR2 (50 BYTE).
DAY 3 VARCHAR2 (50 BYTE).
DAY4 VARCHAR2 (50 BYTE),
DAY5 VARCHAR2 (50 BYTE),
DAY6 VARCHAR2 (50 BYTE),
DAY 7 VARCHAR2 (50 BYTE).
JOUR8 VARCHAR2 (50 BYTE),
DAY9 VARCHAR2 (50 BYTE),
DAY10 VARCHAR2 (50 BYTE),
DAY 11 VARCHAR2 (50 BYTE).
DAY12 VARCHAR2 (50 BYTE),
J13 VARCHAR2 (50 BYTE),
DAY14 VARCHAR2 (50 BYTE),
NOPTIND1 INTEGER DEFAULT 0,
NOPTIND2 INTEGER DEFAULT 0,
NOPTIND3 INTEGER DEFAULT 0,
NOPTIND4 INTEGER DEFAULT 0,
NOPTIND5 INTEGER DEFAULT 0,
NOPTIND6 INTEGER DEFAULT 0,
NOPTIND7 INTEGER DEFAULT 0,
NOPTIND8 INTEGER DEFAULT 0,
NOPTIND9 INTEGER DEFAULT 0,
NOPTIND10 INTEGER DEFAULT 0,
NOPTIND11 INTEGER DEFAULT 0,
NOPTIND12 INTEGER DEFAULT 0,
NOPTIND13 INTEGER DEFAULT 0,
NOPTIND14 INTEGER DEFAULT 0
);

CREATE TABLE PAYPERIODS
(
PERIODID VARCHAR2 (6 BYTE) NOT NULL,
DATE OF STARTPP,
DATE OF ENDPP
);

CREATE TABLE LEAVEREQ
(
LEAVEREQID NUMBER (12) NOT NULL,
EMPID NUMBER (12) NOT NULL,
STARTDATE DATE,
DATE STARTTIME,
END DATE,
LEAVETYPE VARCHAR2 (50 BYTE),
DATE REQUESTED,
ENTIRE DEFAULT 0 APPROVAL
STOP CRITICAL INTEGER DEFAULT 0,
CANCELLED INTEGER DEFAULT 0,
ENTERBY VARCHAR2 (50 BYTE),
APPROVEDBY VARCHAR2 (50 BYTE),
DATE OF APPROVEDWHEN,
REMARKS VARCHAR2 (4000 BYTE),
APPINI VARCHAR2 (2 BYTE),
NUMBER (12) ROUND.
GOAL NUMBER (12).
FMLA NUMBER (12) DEFAULT 0,
LEAVEAREAID NUMBER (12).
ARTICLE26 NUMBER (12) DEFAULT 0,
ORG_LVREQID NUMBER (12)
);

CREATE TABLE EMPLOYEE
(
EMPID NUMBER (12) NOT NULL,
AREAID NUMBER (12) NOT NULL,
BIDAREA NUMBER (12) NOT NULL,
LNAME VARCHAR2 (30 BYTE),
FNAME VARCHAR2 (20 BYTE),
MI VARCHAR2 (3 BYTE),
CLASSIFICATION VARCHAR2 (10 BYTE),
VARCHAR2 (2 BYTE) INITIALS,
DATE OF EODXYZ,
DATE OF EODNAT,
VARCHAR2 (3 BYTE) STATUS,
TURN VARCHAR2 (3 BYTE),
RDO1 VARCHAR2 (6 BYTE),
RDO2 VARCHAR2 (6 BYTE),
TELEPHONE1 VARCHAR2 (14 BYTE),
TELEPHONE2 VARCHAR2 (14 BYTE),
REM VARCHAR2 (75 BYTE) DEFAULT 'NONE. '
LAST4 NUMBER (12).
SICKOK INTEGER,
NOSIGNON INTEGER DEFAULT 0,
TB VARCHAR2 (4 BYTE),
SUP NUMBER (12).
OM NUMBER (12).
FMLA1 INTEGER,
FMLA1SDATE DAY,
FMLA1TYPE NUMBER (12).
FMLA1HRSLEFT NUMBER (12).
ADMINTEMP INTEGER,
LEAVERESTRICT INTEGER,
SLRESTRICT INTEGER,
DATE OF SLRESDATE,
DATE OF SLROCDATE,
DEVSTATUS INTEGER DEFAULT 0,
USERNAME VARCHAR2 (50 BYTE),
PWORD VARCHAR2 (100 BYTE),
PWORDCHG INTEGER,
ULEVEL VARCHAR2 (50 BYTE),
E-MAIL VARCHAR2 (50 BYTE),
VARCHAR2 (50 BYTE) TEAM.
ANN VARCHAR2 (50 BYTE),
DDAY1 VARCHAR2 (50 BYTE) DEFAULT 'x ',.
DDAY2 VARCHAR2 (50 BYTE) DEFAULT 'x ',.
DDAY3 VARCHAR2 (50 BYTE) DEFAULT 'x ',.
DDAY4 VARCHAR2 (50 BYTE) DEFAULT 'x ',.
DDAY5 VARCHAR2 (50 BYTE) DEFAULT 'x ',.
DDAY6 VARCHAR2 (50 BYTE) DEFAULT 'x ',.
DDAY7 VARCHAR2 (50 BYTE) DEFAULT 'x ',.
DDAY8 VARCHAR2 (50 BYTE) DEFAULT 'x ',.
DDAY9 VARCHAR2 (50 BYTE) DEFAULT 'x ',.
DDAY10 VARCHAR2 (50 BYTE) DEFAULT 'x ',.
DDAY11 VARCHAR2 (50 BYTE) DEFAULT 'x ',.
DDAY12 VARCHAR2 (50 BYTE) DEFAULT 'x ',.
DDAY13 VARCHAR2 (50 BYTE) DEFAULT 'x ',.
DDAY14 VARCHAR2 (50 BYTE) DEFAULT 'x ',.
MOVEDATE DATE,
OLDAREA VARCHAR2 (50 BYTE),
GRPQA INTEGER,
GRPTRNG INTEGER,
LOGINFLAG INTEGER DEFAULT 0,
NEWAREAID NUMBER (12).
DATE OF EFFDATE,
MODIFIED_BY VARCHAR2 (30 BYTE),
DATE OF MODIFIED_DATE
);

CREATE TABLE SPACES
(
AREAID NUMBER (12) NOT NULL,
CONFIGID NUMBER (12) NOT NULL,
AREA VARCHAR2 (50 BYTE),
ROLLUPALLOW INTEGER DEFAULT 0,
SIGNONAREA INTEGER DEFAULT 0,
OPDIS INTEGER DEFAULT 0,
MODIFIED_BY VARCHAR2 (30 BYTE),
DATE OF MODIFIED_DATE
);
--------------------------------------------------------------------------------
Insert in CALENDARS
(SCHEDULEID, EMPID, PERIODID, DAY1, AREAID
DAY 2, DAY 3, DAY 4, DAY5 DAY6.
DAY7 JOUR8, DAY9, DAY10, DAY 11,.
J13, DAY14 DAY12, NOPTIND1, NOPTIND2,
NOPTIND3, NOPTIND4, NOPTIND5, NOPTIND6, NOPTIND7,
NOPTIND8, NOPTIND9, NOPTIND10, NOPTIND11, NOPTIND12,
NOPTIND13, NOPTIND14)
Values
(3693744, 753738, '092013', 2003, 'X')
"SHFT < 1530 > ', ' < 1530 SHFT > ', '1530', '1530', '1530',
'X', 'X', '1530', '1530', 'SHIFT ',.
"1530', '1530', 'X', 0, 0,
0, 0, 0, 0, 0,
0, 0, 0, 0, 0,
(0, 0);
Insert in CALENDARS
(SCHEDULEID, EMPID, PERIODID, DAY1, AREAID
DAY 2, DAY 3, DAY 4, DAY5 DAY6.
DAY7 JOUR8, DAY9, DAY10, DAY 11,.
J13, DAY14 DAY12, NOPTIND1, NOPTIND2,
NOPTIND3, NOPTIND4, NOPTIND5, NOPTIND6, NOPTIND7,
NOPTIND8, NOPTIND9, NOPTIND10, NOPTIND11, NOPTIND12,
NOPTIND13, NOPTIND14)
Values
(3693745, 753740, '092013', 2003, 'X')
"SHFT < 1530 > ', ' < 1530 SHFT > ', '1530', 'SHIFT', '1530',
'X', 'X', '1530', '1530', ' 1530',
"1530', '1530', 'X', 0, 0,
0, 0, 0, 0, 0,
0, 0, 0, 0, 0,
(0, 0);
Insert in CALENDARS
(SCHEDULEID, EMPID, PERIODID, DAY1, AREAID
DAY 2, DAY 3, DAY 4, DAY5 DAY6.
DAY7 JOUR8, DAY9, DAY10, DAY 11,.
J13, DAY14 DAY12, NOPTIND1, NOPTIND2,
NOPTIND3, NOPTIND4, NOPTIND5, NOPTIND6, NOPTIND7,
NOPTIND8, NOPTIND9, NOPTIND10, NOPTIND11, NOPTIND12,
NOPTIND13, NOPTIND14)
Values
(3693746, 753748, '092013', 2003, 'X')
"< 1530 SHFT > ', '1530', '1530', '1530', '1530',.
'X', 'X', ' SHFT < 1530 > ', '1530', 'SHIFT ',.
"1530', '1530', 'X', 0, 0,
0, 0, 0, 0, 0,
0, 0, 0, 0, 0,
(0, 0);

COMMIT;

Insert into PAYPERIODS
(PERIODID, STARTPP)
Values
('092013', TO_DATE (APRIL 7, 2013 00:00:00 ',' ' DD/MM/YYYY HH24:MI:SS));))
COMMIT;

Insert into LEAVEREQ
(LEAVEREQID, EMPID, STARTDATE, STARTTIME, ENDTIME,
LEAVETYPE, REQUEST, APPROVAL, REFUSED, ANNULLED,
ENTERBY, APPROVEDBY, APPROVEDWHEN, ROUND, FMLA,.
LEAVEAREAID, 26)
Values
(4265804, 753748, TO_DATE (12 APRIL 2013 00:00:00 ',' DD/MM/YYYY HH24:MI:SS'), TO_DATE (APRIL 1, 2013 08:00 ',' ' HH24:MI:SS JJ/MM/AAAA), TO_DATE (APRIL 1, 2013 12:30 ',' MM/DD/YYYY HH24:MI:SS'),)
'XYZShift', TO_DATE (8 April 2013 15:14:39 ',' ' the HH24: MI: SS DD/MM/YYYY), - 1, 0, 0,.
'GH', 'GH', TO_DATE (8 APRIL 2013 15:18:52 ',' DD/MM/YYYY HH24:MI:SS'), 2, 0,.
2003, 0);
Insert into LEAVEREQ
(LEAVEREQID, EMPID, STARTDATE, STARTTIME, ENDTIME,
LEAVETYPE, REQUEST, APPROVAL, REFUSED, ANNULLED,
ENTERBY, APPROVEDBY, APPROVEDWHEN, ROUND, FMLA,.
LEAVEAREAID, 26)
Values
(4265805, 753740, TO_DATE (12 APRIL 2013 00:00:00 ',' DD/MM/YYYY HH24:MI:SS'), TO_DATE (APRIL 1, 2013 08:00 ',' ' HH24:MI:SS JJ/MM/AAAA), TO_DATE (APRIL 1, 2013 13:45 ',' DD/MM/YYYY HH24:MI:SS'),)
'XYZShift', TO_DATE (8 April 2013 15:16:04 ',' ' the HH24: MI: SS DD/MM/YYYY), - 1, 0, 0,.
'GH', 'GH', TO_DATE (8 APRIL 2013 15:19:49 ',' DD/MM/YYYY HH24:MI:SS'), 2, 0,.
2003, 0);
Insert into LEAVEREQ
(LEAVEREQID, EMPID, STARTDATE, STARTTIME, ENDTIME,
LEAVETYPE, REQUEST, APPROVAL, REFUSED, ANNULLED,
ENTERBY, APPROVEDBY, APPROVEDWHEN, ROUND, FMLA,.
LEAVEAREAID, 26)
Values
(4265806, 753738, TO_DATE (12 APRIL 2013 00:00:00 ',' ' HH24:MI:SS JJ/MM/AAAA), TO_DATE (APRIL 1, 2013 08:00 ',' DD/MM/YYYY HH24:MI:SS'), TO_DATE (APRIL 1, 2013 14:20 ',' DD/MM/YYYY HH24:MI:SS'),)
'XYZShift', TO_DATE (8 April 2013 15:17:12 ',' ' the HH24: MI: SS DD/MM/YYYY), - 1, 0, 0,.
'GH', 'GH', TO_DATE (8 APRIL 2013 15:26:55 ',' DD/MM/YYYY HH24:MI:SS'), 2, 0,.
2003, 0);
COMMIT;


Insert EMPLOYEES
(EMPID, AREAID, BIDAREA, LNAME, FNAME,
CLASSIFICATION, INITIALS, EODXYZ, EODNAT, STATUS,
RDO1, RDO2, REM, SICKOK, NOSIGNON,
TB, SUP, OM, FMLA1, FMLA1SDATE,
FMLA1HRSLEFT, ADMINTEMP, LEAVERESTRICT, SLRESTRICT, SLRESDATE,
SLROCDATE, DEVSTATUS, ULEVEL, E-MAIL, TEAM,
DDAY1, DDAY2, DDAY3, DDAY4, DDAY5,
DDAY6, DDAY7, DDAY8, DDAY9, DDAY10,
DDAY11, DDAY12, DDAY13, DDAY14, MOVEDATE,
OLDAREA, GRPQA, GRPTRNG, LOGINFLAG MODIFIED_BY,
MODIFIED_DATE)
Values
(753738, 2003, 2003, "one", "Employee",)
'4_NON_BUE', 'E1', TO_DATE (1 JANUARY 2002 00:00:00 ',' DD/MM/YYYY HH24:MI:SS'), TO_DATE (JANUARY 1, 2001 00:00:00 ',' DD/MM/YYYY HH24:MI:SS'), 'YES ', HE SAID.
'SAM', 'SUN', 'NONE',-1, 0,
'NONE', 749405, 749405, 0, TO_DATE (JANUARY 1, 2013 00:00:00 "," MM/DD/YYYY HH24:MI:SS'),
8, 0, 0, 0, TO_DATE (JANUARY 1, 2013 00:00:00 "," MM/DD/YYYY HH24:MI:SS'),
To_date (January 1, 2013 00:00:00 "," MM/DD/YYYY HH24:MI:SS'), 0, ' 1000', '[email protected]', '4',
'X', '1530', '1530', ' 1530 ', ' 1530',
"1530 ', 'X', 'X', '1530', ' 1530",
"1530', '1530', '1530', 'X', TO_DATE (MARCH 18, 2013 00:00:00 ',' DD/MM/YYYY HH24:MI:SS'),
"1392 ', 0, 0, 0, '752910',
TO_DATE('03/18/2013 12:10:04', 'MM/DD/YYYY HH24:MI:SS'));)
COMMIT;

Insert EMPLOYEES
(EMPID, AREAID, BIDAREA, LNAME, FNAME,
CLASSIFICATION, INITIALS, EODXYZ, EODNAT, STATUS,
RDO1, RDO2, REM, SICKOK, NOSIGNON,
TB, SUP, OM, FMLA1, FMLA1SDATE,
FMLA1HRSLEFT, ADMINTEMP, LEAVERESTRICT, SLRESTRICT, SLRESDATE,
SLROCDATE, DEVSTATUS, ULEVEL, E-MAIL, TEAM,
DDAY1, DDAY2, DDAY3, DDAY4, DDAY5,
DDAY6, DDAY7, DDAY8, DDAY9, DDAY10,
DDAY11, DDAY12, DDAY13, DDAY14, MOVEDATE,
OLDAREA, GRPQA, GRPTRNG, LOGINFLAG MODIFIED_BY,
MODIFIED_DATE)
Values
(753740, 2003, 2003, "two", "Employee",)
'4_NON_BUE', 'E2', TO_DATE (1 JANUARY 2002 00:00:00 ',' ' HH24:MI:SS JJ/MM/AAAA), TO_DATE (JANUARY 1, 2001 00:00:00 ',' DD/MM/YYYY HH24:MI:SS'), 'YES ', HE SAID.
'SAM', 'SUN', 'NONE',-1, 0,
'NONE', 749405, 749405, 0, TO_DATE (JANUARY 1, 2013 00:00:00 "," MM/DD/YYYY HH24:MI:SS'),
8, 0, 0, 0, TO_DATE (JANUARY 1, 2013 00:00:00 "," MM/DD/YYYY HH24:MI:SS'),
To_date (January 1, 2013 00:00:00 "," MM/DD/YYYY HH24:MI:SS'), 0, ' 1000', '[email protected]', '4',
'X', '1530', '1530', ' 1530 ', ' 1530',
"1530 ', 'X', 'X', '1530', ' 1530",
"1530', '1530', '1530', 'X', TO_DATE (MARCH 18, 2013 00:00:00 ',' DD/MM/YYYY HH24:MI:SS'),
"1392 ', 0, 0, 0, '752910',
TO_DATE('03/18/2013 12:10:04', 'MM/DD/YYYY HH24:MI:SS'));)
COMMIT;

Insert EMPLOYEES
(EMPID, AREAID, BIDAREA, LNAME, FNAME,
CLASSIFICATION, INITIALS, EODXYZ, EODNAT, STATUS,
RDO1, RDO2, REM, SICKOK, NOSIGNON,
TB, SUP, OM, FMLA1, FMLA1SDATE,
FMLA1HRSLEFT, ADMINTEMP, LEAVERESTRICT, SLRESTRICT, SLRESDATE,
SLROCDATE, DEVSTATUS, ULEVEL, E-MAIL, TEAM,
DDAY1, DDAY2, DDAY3, DDAY4, DDAY5,
DDAY6, DDAY7, DDAY8, DDAY9, DDAY10,
DDAY11, DDAY12, DDAY13, DDAY14, MOVEDATE,
OLDAREA, GRPQA, GRPTRNG, LOGINFLAG MODIFIED_BY,
MODIFIED_DATE)
Values
(753748, 2003, 2003, "third", "Employee",)
'4_NON_BUE', 'E3', TO_DATE (1 JANUARY 2002 00:00:00 ',' DD/MM/YYYY HH24:MI:SS'), TO_DATE (JANUARY 1, 2001 00:00:00 ',' DD/MM/YYYY HH24:MI:SS'), 'YES ', HE SAID.
'SAM', 'SUN', 'NONE',-1, 0,
'NONE', 749405, 749405, 0, TO_DATE (JANUARY 1, 2013 00:00:00 "," MM/DD/YYYY HH24:MI:SS'),
8, 0, 0, 0, TO_DATE (JANUARY 1, 2013 00:00:00 "," MM/DD/YYYY HH24:MI:SS'),
To_date (January 1, 2013 00:00:00 "," MM/DD/YYYY HH24:MI:SS'), 0, ' 1000', '[email protected]', '4',
'X', '1530', '1530', ' 1530 ', ' 1530',
"1530 ', 'X', 'X', '1530', ' 1530",
"1530', '1530', '1530', 'X', TO_DATE (MARCH 18, 2013 00:00:00 ',' DD/MM/YYYY HH24:MI:SS'),
"1392 ', 0, 0, 0, '752910',
TO_DATE('03/18/2013 12:10:04', 'MM/DD/YYYY HH24:MI:SS'));)
COMMIT;

Insert areas
(AREAID CONFIGID, AREA, ROLLUPALLOW, SIGNONAREA,
OPDIS)
Values
(2003, 1000, 'TEST',-1, 0,
-1) ;
COMMIT;
------------------------------------------------------------------------------------------------

Published by: George Heller on April 8, 2013 13:32

Published by: George Heller on April 8, 2013 14:35

Published by: George Heller on April 8, 2013 14:49

Hi, George.

George Heller wrote:
Hi all

We have the following query that is used in a report that generates a list of employees working a certain type of movement.


The report also includes a column called RN that is used when the pagination for the report.
What we are trying to do now is to add columns that indicate the total number of hours worked by the employee as well as gran total of hours of work for all employees in the report.

We tried to add the columns last week and have been able to get the totals by using a group by clause. Only problem is that it has changed the order of the column of RN.

Please your postal code. It is very difficult for me to say what you're doing wrong when I don't know what you're doing.

The RN column must stay in numerical order, since we need to select and display the records for paging.

Is it possible to get our totals without disturbing our paging RN column?

If you mix the aggregate functions and analytical in the query (sub-), the clause GROUP BY is applied and aggregate functions are calculated before the analytical functions are calculated. If you need to calculate the analytical functions first, calculate them in a subquery and make the GROUP BY and aggregate functions in a query Super.

In this case, it may be simpler to use the analytical SUM, rather than the SUM function.

SEE below, the application and all the sql to create tables and test data.

Thank you; It is very useful.
It would be even more useful if you included only the columns you really need, for the party, you don't already know how to do. For example, it seems that you need only to display 2 columns and area areaid to the table areas. ConfigId can be very important for this request, but you already know what to do with configid? It seems that the other columns of this table play no role in this issue and comes confusion.

The average time for a first response on this forum is less than 10 minutes. I think people did flee seeing siuch a long message.

...
TRUNC (
24
* (CASE
WHEN l.starttime > l.endtime THEN l.endtime + 1 - l.starttime
ELSE l.endtime - l.starttime
END))
hours,

Why do you enter startime after endtime? If they are on separate days, record the days exactly.

...
WHERE     UPPER (l.leavetype) = 'XYZShift'

The expression to the left of the = sign is guaranteed not to contain all small letters, so it will never equal to "XYZShift".

...
ORDER BY e.lname||', '||e.fname||' - '||e.initials DESC ,u.startdate DESC 

A clause using ORDER BY in this subquery is just a waste of resources. (I'm not talking about analytical clauses ORDER BY;) I mean query ORDER BY clauses, like the one above).

) WHERE rn BETWEEN 1 AND 75
order by rn;

--------------------------------------------------------------------------------
OUTPUT CURRENT

RECORD_COUNT,RN,EMPID,AREA,LNAME,FNAME,INITIALS,STARTDATE,STARTTIME,ENDTIME,HOURS,MINUTES
12,1,753948,TEST,Three,Employee,E3,4/17/2013,,,8,0
12,2,753948,TEST,Three,Employee,E3,4/15/2013,,,8,0
12,3,753948,TEST,Three,Employee,E3,4/12/2013,08:00,12:30,4,30
12,4,753948,TEST,Three,Employee,E3,4/8/2013,,,8,0
12,5,753940,TEST,Two,Employee,E2,4/12/2013,08:00,13:45,5,45
12,6,753940,TEST,Two,Employee,E2,4/11/2013,,,8,0
12,7,753940,TEST,Two,Employee,E2,4/9/2013,,,8,0
12,8,753940,TEST,Two,Employee,E2,4/8/2013,,,8,0
12,9,753938,TEST,One,Employee,O1,4/17/2013,,,8,0
12,10,753938,TEST,One,Employee,O1,4/12/2013,08:00,14:20,6,20
12,11,753938,TEST,One,Employee,O1,4/9/2013,,,8,0
12,12,753938,TEST,One,Employee,O1,4/8/2013,,,8,0

I get only 9 rows in the result set when I run your query. Please zip code that you actually run and the results you get in fact.

DESIREE OUTPUT

RECORD_COUNT,RN,EMPID,AREA,LNAME,FNAME,INITIALS,STARTDATE,STARTTIME,ENDTIME,HOURS,MINUTES,EMPTOTAL,GRANTOTAL
12,1                 ,753948,TEST,Three,Employee,E3       ,4/17/2013   ,               ,             ,8        ,0           ,28:30         ,88:35
12                    ,2,753948,TEST,Three,Employee,E3       ,4/15/2013   ,               ,             ,8        ,0           ,28:30         ,88:35
12                    ,3,753948,TEST,Three,Employee,E3       ,4/12/2013   ,08:00       ,12:30     ,4        ,30         ,28:30         ,88:35
12                    ,4,753948,TEST,Three,Employee,E3       ,4/8/2013     ,               ,             ,8        ,0           ,28:30         ,88:35

Do you really want this order, with 'Tw' sorts before 'Th '?

12                    ,5,753940,TEST,Two,Employee,E2         ,4/12/2013   ,08:00       ,13:45     ,5        ,45         ,29:45         ,88:35
12                    ,6,753940,TEST,Two,Employee,E2         ,4/11/2013   ,               ,             ,8        ,0           ,29:45         ,88:35
12                    ,7,753940,TEST,Two,Employee,E2         ,4/9/2013     ,               ,             ,8        ,0           ,29:45         ,88:35
12                    ,8,753940,TEST,Two,Employee,E2         ,4/8/2013     ,               ,             ,8        ,0           ,29:45         ,88:35
12                    ,9,753938,TEST,One,Employee,O1         ,4/17/2013   ,               ,             ,8        ,0           ,30:20         ,88:35
12                    ,10,753938,TEST,One,Employee,O1       ,4/12/2013   ,08:00       ,14:20     ,6        ,20         ,30:20          ,88:35
12                    ,11,753938,TEST,One,Employee,O1       ,4/9/2013     ,               ,             ,8        ,0           ,30:20          ,88:35
12                    ,12,753938,TEST,One,Employee,O1       ,4/8/2013     ,               ,             ,8        ,0           ,30:20          ,88:35

I think you want something like this:

WITH   u      AS
(
     SELECT  empid,
                startpp + day_number - 1     AS startdate,
                NULL                             AS starttime,
                NULL                    AS endtime,
                8                    AS hours,
                0                    AS minutes
        FROM    schedules      s
            JOIN    payperiods     pp  ON   pp.periodid = s.periodid
     UNPIVOT ( v
          FOR day_number IN ( day1  AS  1
                                       , day2  AS  2
                              , day3  AS  3
                              , day4  AS  4
                              , day5  AS  5
                              , day6  AS  6
                              , day7  AS  7
                              , day8  AS  8
                              , day9  AS  9
                              , day10 AS 10
                              , day11 AS 11
                              , day12 AS 12
                              , day13 AS 13
                              , day14 AS 14
                      )
               )
         WHERE   SUBSTR (v, 1, 4) = 'SHFT'
     UNION ALL
        SELECT  empid,
                 startdate,
                 TO_CHAR (starttime, 'HH24:MI'),
                 TO_CHAR (endtime,   'HH24:MI'),
                 TRUNC ( 24
                     * CASE
                               WHEN starttime > endtime
                   THEN endtime + 1 - starttime
                         ELSE endtime - starttime
                        END
                )               AS hours,
          MOD ( FLOOR ( (endtime - starttime)
                         * 24 * 60
                   )
              , 60
              )               AS minutes
        FROM    leavereq     l
      WHERE   UPPER (leavetype) = 'XYZSHIFT'
            AND     starttime          IS NOT NULL
            AND     approval         = -1
            AND     canceled         = 0
)
,     join_results     AS
(
     SELECT  COUNT (*) OVER () record_count,
                    ROW_NUMBER () OVER ( ORDER BY  e.lname          DESC
                               ,            e.fname           DESC
                         ,            e.initials      DESC
                         ,         u.startdate     DESC
                         )        AS rn,
                u.empid,
                a.area,
                e.lname,
                e.fname,
                e.initials,
                u.startdate,
                u.starttime,
                u.endtime,
                u.hours,
                u.minutes,
          ( 60 * SUM (u.hours)   OVER (PARTITION BY  e.empid)
          )    + SUM (u.minutes) OVER (PARTITION BY  e.empid)     AS emp_minutes,
          ( 60 * SUM (u.hours)   OVER ()
          )    + SUM (u.minutes) OVER ()                    AS grand_minutes
        FROM     u
     JOIN     employee  e  ON   e.empid     = u.empid
     JOIN     areas        a  ON   a.areaid     = e.areaid
     WHERE     a.configid   = 1000
     AND     startdate    BETWEEN TO_DATE ('4/7/2013',  'mm/dd/yyyy')
                    AND     TO_DATE ('4/20/2013', 'mm/dd/yyyy')
)
SELECT       record_count,     rn,        empid,     area,    lname, fname,
       initials,     startdate, starttime, endtime, hours, minutes,
       TRUNC (emp_minutes   / 60) || ':'
                                  || TO_CHAR ( MOD (emp_minutes, 60)
                                   , 'FM00'
                              )     AS emptotal,
       TRUNC (grand_minutes / 60) || ':'
                                  || TO_CHAR ( MOD (grand_minutes, 60)
                                   , 'FM00'
                              )     AS grandtotal
FROM       join_results
WHERE       rn     BETWEEN      1
          AND     75
ORDER BY  rn
;

Tags: Database

Similar Questions

  • I need help my Webcam setting and put in place.

    I NEED HELP MY WEBCAM SETTING AND IMPLEMENTATION. I BOUGHT IT USED

    I need help my Webcam setting and put in place.

    Thinking about ask you for help using Bing, Google or any search engine you want to use.  Try entering "set up the webcam" in your search parameters.

    Or ask for help on the Web site of the manufacturer of the webcam that you have purchased.

  • Stolen laptop need help to reinstall Dreamweaver and Fireworks

    Hi, my laptop was stolen last weekend and I need help to reinstall Dreamweaver and Fireworks on my new MacBook Pro. I have the original software with serial etc. but of course I need to download via the web. Anyone know how I can do this? I don't have a DVD player for the MacBook either.

    ask a number of adobe support resetting activations.  Contact adobe during the time pst support by clicking here and, when available, click on "still need help," https://helpx.adobe.com/contact.html

    Available downloadable Setup files:

    Download and installation help links Adobe

    Help download and installation to Prodesigntools links can be found on the most linked pages.  They are essential; especially steps 1, 2 and 3.  If you click on a link that does not have these listed steps, open a second window by using the link to Lightroom 3 to see these "important Instructions".

  • Is there a default value for the color management in PSE10? Beautiful photos from iPhoto, but blur with elements. I need help with this before as I consider that the upgrade to PSE13 and beyond.

    Is there a default value for the color management in PSE10? Beautiful photos from iPhoto, but blur with elements. I need help with this before as I consider that the upgrade to PSE13 and beyond.

    Printing which forms an angle seems ok, but one that is horizontally seems faded, incomplete.

    I was wondering if I saved a layer somewhere and set it as a default value.

    If you group the layers, you will be left with a single layer, thus spreading your concern.

    Suggest that you do the following:

    1. Make sure you have the latest drivers for your printers
    2. Reset the default preferences.

    Hold the Alt, Ctrl + Shift keys when you click the icon to open the items. When asked if you want to delete the settings file, say Yes.

    Items nearby and let regenerate the file.

  • Ive needs to open a document and it says that I need the most recent version. IM the 11.0.09 running on windows 7 help!

    Ive needs to open a document and it says that I need the most recent version. IM the 11.0.09 running on windows 7 help!mycic error adobe.png

    Ive followed the link several times and updated to the latest version, what I am doing wrong?

    Hi stuartosachuk,

    Type chrome://plugins in the address bar of Chrome. Then, disable "Chrome PDF Viewer" and select "Adobe Reader" plug-in as shown in the screenshot below:

    Now, close the Plug-ins tab and restart Chrome.

    Kind regards

    Ana Maria

  • Need help to install vista on a pc that can not read the DVD

    OK so my pc with vista family venus premium pre installed and somewhere along the line of my dvd read Hothead on my drive so now it only reads CD... ok here is my question how to install vista Home premium without being able to read my dvd system... I can burn and read cds... What can I do? any help greatly appreciated, thanks in advance

    * original title - HELP, need help to install vista on a pc that can not read dvds(i have a legitimate vista key) *.

    # Preinstalled Versions of Windows Vista are OEM versions.  It cannot perform an upgrade from Windows XP.  In addition, you can modify or reverse engineer OEM manufacturer of computers version of Windows Vista... it will never activate. Carey Frisch

  • I would like to delete a short gray border of two images. I need help because I'm still not able to use PhotoShop. Could someone kindly help me with this?

    I would like to delete a short gray border of two images. I need help because I'm still not able to use PhotoShop. Could someone kindly help me with this?

    In order to change a part of an image as needed here, I would use the "Liquify" filter See below, it is quite easy. You just move the lower lip to be more elegant and not like the guys are salivating.

  • Check the latest version shows needs update, try to update and it says that it is already up to date.

    Check the latest version shows needs update, try to update and it says that it is already up to date.

    Note This ASK tells me a question like that already exist, which I had already checked, so I click on show me and it says nothing found.

    I restarted the browser, even said the PC is a good PC, but still get the same result.

    Solution would be appreciated.

    H

    What is the exact version you have today?

    What you said an update is necessary?

  • Need help in the optimization of the query with the Group and joins by clause

    I'm having the problem by running the following query... It takes a lot of time. To simplify, I added the two tables FILE_STATUS = stores the file load details and COMM table Board table job showing records treated successfully and which was communicated to the other system real. Records with status = T is trasnmitted to another system and traansactions with P is waiting.
    CREATE TABLE FILE_STATUS
    (FILE_ID VARCHAR2(14),
    FILE_NAME VARCHAR2(20),
    CARR_CD VARCHAR2(5),
    TOT_REC NUMBER,
    TOT_SUCC NUMBER);
    
    CREATE TABLE COMM
    (SRC_FILE_ID VARCHAR2(14),
    REC_ID NUMBER,
    STATUS CHAR(1));
    
    INSERT INTO FILE_STATUS VALUES ('12345678', 'CM_LIBM.TXT', 'LIBM', 5, 4);
    INSERT INTO FILE_STATUS VALUES ('12345679', 'CM_HIPNT.TXT', 'HIPNT', 4, 0);
    
    INSERT INTO COMM VALUES ('12345678', 1, 'T');
    INSERT INTO COMM VALUES ('12345678', 3, 'T');
    INSERT INTO COMM VALUES ('12345678', 4, 'P');
    INSERT INTO COMM VALUES ('12345678', 5, 'P');
    COMMIT;
    Here's the query I wrote to give me the details of the file that has been loaded into the system. He reads the table of State and the commission files to display the name of the file, total records loaded, total at the table of the commission and the number of records which has finally been passed successfully loaded (Status = T) with other systems.
    SELECT 
        FS.CARR_CD 
        ,FS.FILE_NAME 
        ,FS.FILE_ID
        ,FS.TOT_REC
        ,FS.TOT_SUCC
        ,NVL(C.TOT_TRANS, 0) TOT_TRANS
    FROM FILE_STATUS FS
    LEFT JOIN
    (
        SELECT SRC_FILE_ID, COUNT(*) TOT_TRANS
        FROM COMM
        WHERE STATUS = 'T'
        GROUP BY SRC_FILE_ID
    ) C ON C.SRC_FILE_ID = FS.FILE_ID
    WHERE FILE_ID = '12345678';
    In production, this request has several joins and takes a long time to deal with... the main culprit for me is the join on the COMM table to count the number of number of transactions sent. Please can you give me tips to optimize this query to get results faster? What I need to delete the Group and use the partition or something else. Help, please!

    Don't know if it will be faster based on the information provided, but analytical functions offer an alternative approach;

    select carr_cd, file_name, file_id, tot_rec, tot_succ, tot_trans
      from (select fs.carr_cd,
                   fs.file_name,
                   fs.file_id,
                   fs.tot_rec,
                   fs.tot_succ,
                   count(case
                            when c.status = 'T' then
                             1
                            else
                             null
                          end) over(partition by c.src_file_id) tot_trans,
                   row_number() over(partition by c.src_file_id order by null) rn
              from file_status fs
              left join comm c
                on c.src_file_id = fs.file_id
             where file_id = '12345678')
     where rn = 1;
    
    CARR_CD FILE_NAME            FILE_ID           TOT_REC   TOT_SUCC  TOT_TRANS
    ------- -------------------- -------------- ---------- ---------- ----------
    LIBM    CM_LIBM.TXT          12345678                5          4          2
    
  • Satellite L955-10f - need help with uninstall Win8 and install Win7

    I'm now totally fed up with the Mickey Mouse Windows 8 OS and want to return to Windows 7. I have a new laptop Toshiba Satellite L955-10f. Should I use the recovery disk to get rid of W8?

    Is there a way I can get a recovery for W7 for this machine disk in case it is needed in the future? I'm not technical, so any help will be appreciated.

    Thanks in advance.

    Right there is big problem with this machine. I ve checked the download page of Toshiba and this model is not supported for Win7, it will be difficult to find the right drivers, tools and utilities.

    This model is designed for Win7 Toshiba doesn't offer Win7 recovery disc.
    This is a rather complicated situation. The first thing you need to do should now create Win8 recovery media using the preinstalled Toshiba Recovery Disk Creator.

    I put t know what to say. Maybe you have someone with an excellent knowledge of PC and who can help you with this. Material of your machine should be compared with other models may be supported, so you will be able to use the drivers, tools and utilities available for these models.

  • Need help to add videos to my rocket

    I got it for Christmas. I know how to add all my songs and pictures, but I can't add videos to it. Whenever I add a video in the video folder, I look on my rocket and he said either "Format file not supported" or it just does not appear on my rocket. Any help? I know that the video format is MPEG-4, but I need help to really watch my videos!

    You must use Sansa Media Converter. Even if its a MP4 you use MSC. It's the only way right now. The converter is avalible here is at the top of the page under the downloads section

  • Need help to find bosses and leaders out there

    Hi all

    I need help to find patterns, but also the number of occurrences of these models in the data in the column of the table.

    Consider the examples of data - column of a row in a table:

    'S-S-S-P-S-B-S-S-C-S-P '.

    My requirement is:

    I should get all the models that are followed is "."

    For example, the foregoing, given given bosses and Auditors are
    SS - count is 3
    SP - count is 2
    SB - 1 is
    SS - count is 1

    There is a condition most the above requirement:

    If' is followed by 'A', then 'SA' is not as a model. The model must stretch until a character no 'A' is found.

    Consider the sample data for the above case:

    'S-S-A-S-S-A-A-C-S-P-S-A '.

    previously given given bosses and Auditors are
    SS - count is 2
    SP - count is 1
    SAS - count is 1
    SAAC - count is 1

    The column data is stored as type VARCHAR2.

    I have Oracle Database 11 g Enterprise Edition Release 11.1.0.6.0 - 64 bit Production

    Thanks in advance,
    Girish G

    Hi, Girish,

    Girish G wrote:
    Hi all

    I need help to find patterns, but also the number of occurrences of these models in the data in the column of the table.

    Consider the examples of data - column of a row in a table:

    'S-S-S-P-S-B-S-S-C-S-P '.

    My requirement is:

    I should get all the models that are followed is "."

    Do you mean "I should get all the models who * begin by * of '?

    For example, the foregoing, given given bosses and Auditors are
    SS - count is 3
    SP - count is 2
    SB - 1 is
    SS - count is 1

    Why are there two production lines for "SS"? The other, with count = 1, mean doing just that?

    There is a condition most the above requirement:

    If' is followed by 'A', then 'SA' is not as a model. The model must stretch until a character no 'A' is found.

    Consider the sample data for the above case:

    'S-S-A-S-S-A-A-C-S-P-S-A '.

    previously given given bosses and Auditors are
    SS - count is 2
    SP - count is 1
    SAS - count is 1
    SAAC - count is 1

    The column data is stored as type VARCHAR2.

    I have Oracle Database 11 g Enterprise Edition Release 11.1.0.6.0 - 64 bit Production

    Thank you; version information are very useful.

    Thanks in advance,
    Girish G

    Whenever you have a question, please post a small example of data (CREATE TABLE and INSERT statements) and the results desired from these data.
    For example, the sample data may be:

    CREATE TABLE     table_x
    (       x_id     NUMBER     PRIMARY KEY
    ,     txt     VARCHAR2 (30)
    );
    
    INSERT INTO table_x (x_id, txt) VALUES (1, 'S-S-S-P-S-B-S-S-C-S-P');
    INSERT INTO table_x (x_id, txt) VALUES (2, 'S-S-A-S-S-A-A-C-S-P-S-A');
    

    and the results desired from these data can be:

    X_ID TXT                       PATTERN                          CNT
    ---- ------------------------- ------------------------- ----------
       1 S-S-S-P-S-B-S-S-C-S-P     SB                                 1
       1 S-S-S-P-S-B-S-S-C-S-P     SC                                 1
       1 S-S-S-P-S-B-S-S-C-S-P     SP                                 2
       1 S-S-S-P-S-B-S-S-C-S-P     SS                                 3
    
       2 S-S-A-S-S-A-A-C-S-P-S-A   SAAC                               1
       2 S-S-A-S-S-A-A-C-S-P-S-A   SAS                                1
       2 S-S-A-S-S-A-A-C-S-P-S-A   SP                                 1
       2 S-S-A-S-S-A-A-C-S-P-S-A   SS                                 2
    

    (Which is what you have posted, except that there is only one line of output for "SS" when x_id = 1.)

    One way to achieve these results in Oracle 11 is:

    WITH   got_s_cnt    AS
    (
         SELECT     x_id, txt
         ,     REGEXP_COUNT (txt, 'S')     AS s_cnt
         FROM     table_x
    )
    ,     cntr          AS
    (
         SELECT     LEVEL     AS n
         FROM     dual
         CONNECT BY     LEVEL <= (
                                   SELECT  MAX (s_cnt)
                             FROM    got_s_cnt
                               )
    )
    ,     got_pattern     AS
    (
         SELECT     s.x_id
         ,     s.txt
         ,     c.n
         ,     REGEXP_SUBSTR ( REPLACE ( SUBSTR ( txt
                                                 , INSTR (s.txt, 'S', 1, c.n)
                                    )
                             , '-'
                             )
                         , 'SA*[^A]'
                            )       AS pattern
         FROM    got_s_cnt  s
         JOIN     cntr        c  ON  c.n  <= s.s_cnt
    )
    SELECT       x_id
    ,       txt
    ,       pattern
    ,       COUNT (*)     AS cnt
    FROM       got_pattern
    WHERE       pattern     IS NOT NULL
    GROUP BY  x_id
    ,            txt
    ,       pattern
    ORDER BY  x_id
    ,            pattern
    ;
    

    At the heart of this query is the call to REGEXP_SUBSTR:

    REGEXP_SUBSTR ( x
               , 'SA*[^A]'
               )
    

    who is looking:
    S = the letter S
    A * = the letter A, 0 or more times
    [^ A] = nothing, except the letter A

  • HP Pavilion Notebook - 15-p199: need help with the installation and activation of 10 Windows after completely uninstalling Windows

    Hello HP assistants.

    I need help for a specific problem. My laptop came with an installation of Windows 8.1. Then I upgraded to 10 Windows when it became available. After a while, I decided to uninstall Windows completely (to wipe the hard drive) and install a Linux operating system.

    Now, I decided that I want to use some software that is not available on Linux and if I want to reinstall Windows 10. My problem is that Windows has completely disappeared in a form any. So now, I need to download Windows 10 from an official source (which I think can be done fairly easily from the official source of Microsoft, although if there is a better, HP official medium to do this then please recommend it) and then I need to activate Windows some how.

    As has been made clear, I have the right to use Windows 8.1 and 10 but I would need to download Windows 10 and turn it on. Is there a way to do this? I'm literally stuck without solution.

    Thanks in advance.

    Hello

    As long as the previous installation of Windows 10 had activated Ok after upgrade from 8.1, you can simply perform a new installation as described in the guide on the following link.  Note: On the activation screen, select "I don't have a product key" - Windows will activate automatically once installation is complete.

    http://www.howtogeek.com/224342/how-to-clean-install-Windows-10/

    Kind regards

    DP - K

  • Need help: impossible update IE and Vista - error _80070246 WindowsUpdate_dt000

    I am Brazilian, using a Dell Inspiron 1525 with Vista Home Premium.
    Need help with Windows Update (since June, I just can't do the update for IE7 - use now - and can't update to IE8). All other updates ok, instaled. But with both apears 'error' as this = "WindowsUpdate_80070246" "WindowsUpdate_dt000" - and says it's a mistake not recognized Windows Update.rsrsrsrs
    The same thing for Service Pack 2 KB948465 - failed... Troubleshooting!

    Penny Brasil e uso Dell 1525 com Home Premium.
    Ajuda com o Windows Update, pq desde preciso an atualizacao junho I can not driver IE8 browser o; "por isso desinstalei o IE8, following os passos do Microsoft site, e voltei anterior ao, IE 7 error-mas as 2 atualizacoes, para o IE7 e an instalacao (of novo) IE8 falham - code WindowsUpdate_80070246" "WindowsUpdate_dt000" Usava o NIS2008 (firewall, antivirus e) e troquei em julho pelo NIS2009, sempre updated e ativo.
    O updated Service Pack2 KB948465 falha also ate agora. As atualizacoes ocorreram demais e ocorrem usually (ok).
    NAO sei o pode estar explain.
    Agradea§o any ajuda.

    Hi Gik09,

    Thank you for visiting Windows Vista Microsoft answers forum.

    This problem occurs if the GlobalInstallOrder.xml file is damaged. The GlobalInstallOrder.xml file is in the following location:
    %Windir%\Winsxs\x86_microsoft-Windows-servicingstack_31bf3856ad364e35_6.0.6000.16386_none_07289f4cca5f6990\GlobalInstallOrder.XML

    To resolve this problem, please follow the steps mentioned in the link to the following Article:
    http://support.Microsoft.com/kb/942968

    Please let us know if it helps.

    Thank you and best regards,
    David

  • [SOLVED] I need help for Shared Documents and Documents on my computer XP Home

    I need help with my shared Documents and other folders on my computer. I have an administrator account. My son has a limited access account.

    I clicked on the option 'make my private files and folders '.  His file was renamed to Documents now my shared Documents. It's just my account.

    I tried to undo what I did. I tried everything (I mean everything) has proposed to do online.

    First of all, I logged in Safemode administrator account. I went to the Documents folder, and I've added the Administrators group and click full control.

    Then I restored system a few weeks before. Then, I went to http://computers.douglasthrift.net/winxpfaq/#faq3_shared_documents and did everything.

    None of them worked. I did so much, that I don't remember.

    Then, I found that the registry key for the Shared Documents lacked in the MUi cache. @shell32.dll,-21785. I entered, but after I rebooted a few times, he disappeared. I have to hurt... In addition to this. Now I face a different problem. I don't know it is normal but when I login my account and click on

    My computer, I see Documents of my name and the name of my son in addition to Documents (Shared Documents).

    When I save a new file in the My Documents folder, it is automatically created in the folder of Documents of my name, too. I can't delete them because they are system folders. I crossed my registry keys in the MUI cache and discovered that 4 of them did not exist in other accounts.

    @shell32.dll,-21792; 21793; 21794; 21795 (%, etc. of music of % documents). I don't know if I can delete them or not.

    I'm not an expert in computers. I'm sorry that it is very long.  I hope someone can help me. Thank you.

    Hello

    I suggest you follow the troubleshooting steps and check if this solves the problem on your computer.

    Method:

    Ra SFC scan to search for the missing or corrupt files that can cause this problem.

    Of file system (CFS) when checking that all the Windows XP system files are intact and not altered, changed or damaged.

    a. Click Start, click programs, accessories, command prompt principally made.

    b. in the type in the following command prompt window and press ENTER:

    sfc/scannow

    If you are prompted to insert the Windows XP disc, load the disc of Windows XP on the CD drive on your computer.

    Once the scan finished restart your computer and test to see if the problem you are experiencing is resolved or not.

    Reference: http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/system_file_checker.mspx?mfr=true

    I hope this information helps. Please get back to us if you have any other questions on this subject.

Maybe you are looking for