Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Database > Oracle
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Oracle General Oracle database discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Oracle section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 30th, 2004, 06:25 AM
Authorized User
 
Join Date: May 2004
Location: Chennai, Tamil Nadu, India.
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to saravananedu
Default matrix report output

i need an urgent query.

i've to display a table contents in a matrix format.

table is: material_stock

the o/p will look like:

plant/materials material1 material2 materia l3 ....

plant1 actualqty actualqty actualqty   

plant2 actualqty actualqty actualqty

plant3 actualqty actualqty actualqty

.
.
.

have u got it?

I'LL TELL U IN DETAIL.

TABLE IS:

CREATE TABLE MATERIAL_STOCK(PART_NUMBER VARCHAR2(20),
PLANT CHAR(4),PHYSICAL QUANTITY NUMBER(30,3),
ACTUAL QUANTITY NUMBER(30,3));

OUTPUT SHOULD LOOK LIKE:

Plant Material 1 Material 2 Material 3
plantcode1 qty qty qty
plantcode2 qty qty qty
plantcode3 qty qty qty
plantcode4 qty qty qty
--


hope ur reply soon.

Thanks in advance.

Yours,
Saran
__________________
Best Regards,
Saran.
  #2 (permalink)  
Old March 3rd, 2005, 10:20 AM
Registered User
 
Join Date: Feb 2005
Location: Hyderabad, Andhra Pradesh, India.
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to SureshHyd
Default

Look at this example query with sample output:
        SELECT *
        FROM (SELECT job,
                      sum(decode(deptno,10,sal)) DEPT10,
                      sum(decode(deptno,20,sal)) DEPT20,
                      sum(decode(deptno,30,sal)) DEPT30,
                      sum(decode(deptno,40,sal)) DEPT40
                 FROM scott.emp
                GROUP BY job)
        ORDER BY 1;

        JOB DEPT10 DEPT20 DEPT30 DEPT40
        --------- ---------- ---------- ---------- ----------
        ANALYST 6000
        CLERK 1300 1900 950
        MANAGER 2450 2975 2850
        PRESIDENT 5000
        SALESMAN 5600
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Displaying Matrix Report Ahmed-Deq Classic ASP Basics 3 February 19th, 2008 11:56 PM
Matrix report issue aranjan BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 0 February 4th, 2007 02:42 AM
fusion between matrix and tabular report.. johnnygut Reporting Services 0 November 16th, 2006 04:15 PM
matrix report rhbandagi Classic ASP Databases 0 March 24th, 2006 04:06 AM
2 independent Column Groups in report matrix? Andrei Reporting Services 1 February 21st, 2006 12:42 AM



All times are GMT -4. The time now is 02:04 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.