Home » SQL & PL/SQL » SQL & PL/SQL » CrossTab
CrossTab [message #246204] Wed, 20 June 2007 05:05 Go to next message
raajes_n
Messages: 33
Registered: April 2005
Location: India
Member

Gurus,

I've Oracle 9i Table like this

Cl: Business: Source: Analyst: Times:
GE -- Analytics -- Peer -- Chayan -- Once
AA -- Collections -- Third -- Remya -- Twice


I want Output like this

Cl: Business: Source: Chayan: Remya:
GE -- Analytics -- Peer -- Once -- Nil
AA -- Collections -- Third -- Nil -- Twice

I seek your precious help

Rajesh N.
Re: CrossTab [message #246210 is a reply to message #246204] Wed, 20 June 2007 05:21 Go to previous messageGo to next message
Michel Cadot
Messages: 64152
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
If someone understand what is the columns, what is the data, what is the column headers, what is the output column values, (s)he can feel free to answer.

Please read and follow How to format your posts and How to get a quick answer to your question: TIPS AND TRICKS.
Please always post your Oracle version (4 decimals).

Regards
Michel

Re: CrossTab [message #246250 is a reply to message #246210] Wed, 20 June 2007 07:30 Go to previous messageGo to next message
raajes_n
Messages: 33
Registered: April 2005
Location: India
Member

Sorry

Create table T1 (
Cl varchar2(100),
Business varchar2(100),
Source varchar2(100),
Analyst varchar2(100),
Times varchar2(100))

insert into T1 values(
'GE','Analytics','Peer','Chayan','Once')
insert into T1 values(
'AA','Collections','Third','Remya','Twice')

Now it's clear.

Rajesh N.
Re: CrossTab [message #246259 is a reply to message #246250] Wed, 20 June 2007 08:03 Go to previous message
Michel Cadot
Messages: 64152
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
And the FORMATTED output should be?

Regards
Michel
Previous Topic: insert pdf & image in oracle database using sql command line syntax
Next Topic: How to get a postion of a character in string
Goto Forum:
  


Current Time: Sat Dec 10 08:59:43 CST 2016

Total time taken to generate the page: 0.12729 seconds