Home » SQL & PL/SQL » SQL & PL/SQL » Matrix Report Out put (Oracle 10 G, Windows7)
Matrix Report Out put [message #682180] Thu, 08 October 2020 02:15 Go to next message
hissam78
Messages: 193
Registered: August 2011
Location: PAKISTAN
Senior Member
Dear Respectful Experts,

Need help to create the Sql for attached Output,
Table script and insert statement is given below and output attached in .png format.
Please help,

Thankful,
--========================================================

CREATE TABLE PATHER
(PATHER_NAME VARCHAR2(200),
BRICK_TYPE VARCHAR2(100),
QTY NUMBER,
DATE_P DATE,
RATE NUMBER
)



INSERT INTO PATHER
(PATHER_NAME, BRICK_TYPE,QTY,DATE_P,RATE)
VALUES
('Sadat khan', 'QALIB',2500,'08-OCT-2020', 700)

INSERT INTO PATHER
(PATHER_NAME, BRICK_TYPE,QTY,DATE_P,RATE)
VALUES
('Shakir', 'CLUTCH',2500,'08-OCT-2020', 800)

INSERT INTO PATHER
(PATHER_NAME, BRICK_TYPE,QTY,DATE_P,RATE)
VALUES
('gul sadi', 'Choka 10/5',400,'06-OCT-2020', 700)

INSERT INTO PATHER
(PATHER_NAME, BRICK_TYPE,QTY,DATE_P,RATE)
VALUES
('khan dad', 'QALIB',2000,'07-OCT-2020', 700)

INSERT INTO PATHER
(PATHER_NAME, BRICK_TYPE,QTY,DATE_P,RATE)
VALUES
('rahim dad', 'QALIB',1900,'05-OCT-2020', 700)

INSERT INTO PATHER
(PATHER_NAME, BRICK_TYPE,QTY,DATE_P,RATE)
VALUES
('gul baz', 'QALIB',1500,'08-OCT-2020', 700)

COMMIT;
Re: Matrix Report Out put [message #682181 is a reply to message #682180] Thu, 08 October 2020 02:29 Go to previous messageGo to next message
John Watson
Messages: 8922
Registered: January 2010
Location: Global Village
Senior Member
First, your INSERTs will fail for most people because you have not used TO_DATE.
Second, there appears to be no relationship between the rows you insert and those in your screenshot.
Third, the MODEL clause is usually what you need to use to create spreadsheet-type of output.
Re: Matrix Report Out put [message #682182 is a reply to message #682181] Thu, 08 October 2020 02:33 Go to previous messageGo to next message
hissam78
Messages: 193
Registered: August 2011
Location: PAKISTAN
Senior Member
Dear John Watson,
I am very sorry, really i forgot to use to_date function, and report output is just for format output.

My apologies for such non sense things i have done.

Is it possible to generate output or i need to send again..


thankful,

[Updated on: Thu, 08 October 2020 02:34]

Report message to a moderator

Re: Matrix Report Out put [message #682183 is a reply to message #682182] Thu, 08 October 2020 03:49 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
You also forgot to format your post and to put INSIDE the post the output you want with the rules to apply to get it.
AS ALWAYS you refuse to follow the rules.

Quote:
Is it possible to generate output or i need to send again..
The later is what to do.
I repeat once more:

Michel Cadot wrote on Tue, 08 October 2019 13:08

Please read the OraFAQ Forum Guide and How to use [code] tags and make your code easier to read.

With any SQL or PL/SQL question, please, Post a working Test case: create table (including all constraints) and insert statements along with the result you want with these data then we will be able work with your table and data. Explain with words and sentences the rules that lead to this result.

Also always post your Oracle version, with 4 decimals (query v$version), as often solution depends on it.

[Updated on: Thu, 08 October 2020 03:49]

Report message to a moderator

Re: Matrix Report Out put [message #682187 is a reply to message #682180] Thu, 08 October 2020 05:40 Go to previous messageGo to next message
Solomon Yakobson
Messages: 3269
Registered: January 2010
Location: Connecticut, USA
Senior Member
Not possible if dates are not known upfront or max possible number of dates is unknown. This is a job for reporting tool.

SY.
Re: Matrix Report Out put [message #682237 is a reply to message #682187] Sun, 11 October 2020 23:41 Go to previous message
hissam78
Messages: 193
Registered: August 2011
Location: PAKISTAN
Senior Member

Thankful, Solomon Yakobson, have follow your instructions and developed report in Report 6i with Matrix option.



Previous Topic: REgexp_substr function to extract sub string
Next Topic: converting Unix Time format to readable format
Goto Forum:
  


Current Time: Thu Mar 28 13:17:05 CDT 2024