Home » Developer & Programmer » Reports & Discoverer » Data to be taken in different format (Reports 6i )
Data to be taken in different format [message #571853] |
Sun, 02 December 2012 22:28 |
|
I have one table storing all the information about employye, i have to develop three different reports based on the same table with different groupings , is there a easy way to call each format differently using single interface ,something like ref cursor.I dont want to create two or 3 different reports , instead choose the format.
CREATE TABLE OT_JOB_DET
(
JT_TXN VARCHAR2(12 BYTE),
JT_NO NUMBER,
JT_DT DATE,
JT_EMP_CODE VARCHAR2(6 BYTE),
JT_DURATION NUMBER
)/
INSERT INTO OT_JOB_DET ( JT_TXN, JT_NO, JT_DT, JT_EMP_CODE,
JT_DURATION ) VALUES (
'time', 1, TO_Date( '11/04/2012 12:00:00 AM', 'MM/DD/YYYY HH:MI:SS AM'), 'AA', 10);
INSERT INTO OT_JOB_DET ( JT_TXN, JT_NO, JT_DT, JT_EMP_CODE,
JT_DURATION ) VALUES (
'time', 2, TO_Date( '11/01/2012 12:00:00 AM', 'MM/DD/YYYY HH:MI:SS AM'), 'AA', 12);
INSERT INTO OT_JOB_DET ( JT_TXN, JT_NO, JT_DT, JT_EMP_CODE,
JT_DURATION ) VALUES (
'time', 3, TO_Date( '11/09/2012 12:00:00 AM', 'MM/DD/YYYY HH:MI:SS AM'), 'BB', 7);
INSERT INTO OT_JOB_DET ( JT_TXN, JT_NO, JT_DT, JT_EMP_CODE,
JT_DURATION ) VALUES (
'time', 4, TO_Date( '11/14/2012 12:00:00 AM', 'MM/DD/YYYY HH:MI:SS AM'), 'CC', 2.43);
INSERT INTO OT_JOB_DET ( JT_TXN, JT_NO, JT_DT, JT_EMP_CODE,
JT_DURATION ) VALUES (
'time', 5, TO_Date( '11/15/2012 12:00:00 AM', 'MM/DD/YYYY HH:MI:SS AM'), 'DD', 2);
COMMIT;
first output
SELECT JT_DT,SUM(JT_DURATION)FROM
OT_JOB_DET GROUP BY JT_DT;
SELECT JT_EMP_CODE ,SUM(JT_DURATION) FROM
OT_JOB_DET GROUP BY JT_EMP_CODE;
[Updated on: Sun, 02 December 2012 22:29] Report message to a moderator
|
|
|
|
|
|
|
Goto Forum:
Current Time: Sat Nov 30 05:10:49 CST 2024
|