Home » SQL & PL/SQL » SQL & PL/SQL » Data as column heading (oracle10g)
Data as column heading [message #391380] Thu, 12 March 2009 00:41 Go to next message
sr_orcl
Messages: 82
Registered: January 2009
Location: mumbai
Member

Hi,
I need some help to this query
My filter condition is Start date and End date
I want this tyep of output.
Please check in the given attached filef or test cases
 PROJECT	  Jan 09	Feb 09	Grand_Total
11G Feature           10             0           10     
Adhoc Request          6             0            6      
China Customization   20            10           30	
Grand total           36            10           46

[EDITED by LF: applied [pre] tags]
  • Attachment: t1.sql
    (Size: 5.38KB, Downloaded 191 times)

[Updated on: Thu, 12 March 2009 02:34] by Moderator

Report message to a moderator

Re: Data as column heading [message #391382 is a reply to message #391380] Thu, 12 March 2009 00:44 Go to previous messageGo to next message
BlackSwan
Messages: 25050
Registered: January 2009
Location: SoCal
Senior Member
>I need some help to this query
What query?

>
So?

>
HUH?



Re: Data as column heading [message #391384 is a reply to message #391380] Thu, 12 March 2009 00:54 Go to previous messageGo to next message
joicejohn
Messages: 327
Registered: March 2008
Location: India
Senior Member
@sr_orcl

Please follow the posting guidelines as mentioned in OraFAQ Forum Guide..
Most of us can't download any attachments. So you have to post whatever SQL or output is in the attatchment in the forum directly.

Regards,
Jo
Re: Data as column heading [message #391385 is a reply to message #391380] Thu, 12 March 2009 00:54 Go to previous messageGo to next message
sr_orcl
Messages: 82
Registered: January 2009
Location: mumbai
Member

For generating the above output
Re: Data as column heading [message #391391 is a reply to message #391385] Thu, 12 March 2009 01:28 Go to previous messageGo to next message
Michel Cadot
Messages: 64151
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
sr_orcl wrote on Thu, 12 March 2009 06:54
For generating the above output

select 'PROJECT Jan 09 Feb 09 Grand_Total
11G Feature 10 0 10
Adhoc Request 6 0 6
China Customization 20 10 30
Grand total 36 10 46'
from dual
/

Regards
Michel

Re: Data as column heading [message #391396 is a reply to message #391380] Thu, 12 March 2009 02:03 Go to previous message
ashoka_bl
Messages: 398
Registered: November 2006
Location: Bangalore
Senior Member

Hey,

What is the relationship between the tables ?? PROJECT AND BILLINGCYCLE ?????

And what have you tried so far ??

Search for "PIVOT", you will get lots of solutions..

Regards,
Ashoka BL
Bengaluru
Previous Topic: sql query sequnce help
Next Topic: Stuck in buffer overflow
Goto Forum:
  


Current Time: Fri Dec 09 23:32:19 CST 2016

Total time taken to generate the page: 0.08028 seconds