Home » SQL & PL/SQL » SQL & PL/SQL » query (oracle 10g)
query [message #382677] Fri, 23 January 2009 09:51 Go to next message
pointers
Messages: 451
Registered: May 2008
Senior Member
Hi,

I have a table lets say "data"

sql>desc data:
id  number
name varchar2(20)
time date
dno number


It is a very huge table has lot of records.

the available data as..
id    name   time                           dno
1     a      12/10/2008 12:04:29 AM         400 
1     a      12/10/2008 12:04:29 AM         400
.
.
100 records
.
.
.
.
2     b      12/11/2008 12:04:29 AM         400
2     b      12/11/2008 1:04:29 AM          400 
.
.
.
.
some 100 records

the dno is common across all the records.
I want the output as
dno         dates_for_id=1                  dates_for_id=2
400        12/10/2008 12:04:29 AM           12/11/2008 12:04:29 AM
.            .                                . 
.            .                                . 
.            .                                .  
.            .                                . 
400        (alldates related to             (alldates related to
           id=1)                              id=2)



Please help me out.

Regards,
Pointers.
Re: query [message #382686 is a reply to message #382677] Fri, 23 January 2009 10:17 Go to previous messageGo to next message
Michel Cadot
Messages: 68733
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
And where is your problem?

Regards
Michel
Re: query [message #382700 is a reply to message #382677] Fri, 23 January 2009 10:59 Go to previous messageGo to next message
pointers
Messages: 451
Registered: May 2008
Senior Member
I am unable to show the data in the given output format..
Re: query [message #382701 is a reply to message #382700] Fri, 23 January 2009 11:01 Go to previous message
Michel Cadot
Messages: 68733
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Let's state it in another way.
What did you already try and why it does not work.

Post a Test case: create table and insert statements along with the result you want with these data.

Regards
Michel
Previous Topic: Prompting user to input informatio
Next Topic: Extract Timezone (merged)
Goto Forum:
  


Current Time: Mon Feb 10 10:56:51 CST 2025