Home » SQL & PL/SQL » SQL & PL/SQL » select in one line
select in one line [message #195300] Wed, 27 September 2006 18:50 Go to next message
farahat
Messages: 14
Registered: August 2006
Location: sudan
Junior Member

hi 4 all
I have a table EMP
2 columns, Eno and Name
I have data in like : 1 moh
2 dad
3 paf


I want to make 1 statment (Select) that give me each 3 records in one line.

Thanks
Re: select in one line [message #195314 is a reply to message #195300] Wed, 27 September 2006 20:50 Go to previous messageGo to next message
BlackSwan
Messages: 25032
Registered: January 2009
Location: SoCal
Senior Member
what is supposed to happen when the number of records grows & increases substantially?
Re: select in one line [message #195324 is a reply to message #195314] Thu, 28 September 2006 00:51 Go to previous messageGo to next message
ashok_it
Messages: 40
Registered: November 2005
Location: Singapore
Member
hi,

you try this.


select decode (mod(rownum,3),1,empname) ,
decode (mod(rownum,3),2,empname) ,
decode (mod(rownum,3),3,empname) ,
from talbename



Tks & Rgds
ashok
Re: select in one line [message #195340 is a reply to message #195314] Thu, 28 September 2006 02:06 Go to previous message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
They'll have moved on the the next piece of homework by then Cool
Previous Topic: Truncate
Next Topic: MAXEXTENTS
Goto Forum:
  


Current Time: Fri Dec 02 12:42:49 CST 2016

Total time taken to generate the page: 0.06234 seconds