Home » SQL & PL/SQL » SQL & PL/SQL » Query (Oracle9i)
Query [message #428941] Sat, 31 October 2009 00:46 Go to next message
ramesh55.sse
Messages: 262
Registered: December 2008
Location: Hyderabad
Senior Member
The table1 contains the following data

SNO SNAME
1 Ramesh
1 Babu
2 Ram
2 Kumar
3 Vikram
3 Krishna

I want the following output ,Please help me

SNO SNAME
1 Rameshbabu
2 RamKumar
3 VikramKrishna
Re: Query [message #428945 is a reply to message #428941] Sat, 31 October 2009 01:19 Go to previous messageGo to next message
delna.sexy
Messages: 941
Registered: December 2008
Location: Surat, The Diamond City
Senior Member
Did you try anything before posting your question here?
Or did you searched anywhere? Google or this forum itself?

regards,
Delna
Re: Query [message #428946 is a reply to message #428941] Sat, 31 October 2009 01:22 Go to previous messageGo to next message
ramesh55.sse
Messages: 262
Registered: December 2008
Location: Hyderabad
Senior Member
i tried in google but i haven't got the answer
Re: Query [message #428948 is a reply to message #428946] Sat, 31 October 2009 01:33 Go to previous messageGo to next message
delna.sexy
Messages: 941
Registered: December 2008
Location: Surat, The Diamond City
Senior Member
Is that fixed that each and every SNO will get repeat twice?
If yes, then you can use LAG/LEAD analytic function.

Otherwise search for PIVOT in this forum.

regards,
Delna.
Re: Query [message #428955 is a reply to message #428941] Sat, 31 October 2009 02:04 Go to previous messageGo to next message
Michel Cadot
Messages: 63810
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
From your previous topic but almost of them contains it:
Michel Cadot wrote on Sat, 17 October 2009 08:30
Post a working Test case: create table and insert statements along with the result you want with these data.
Read OraFAQ Forum Guide, especially "How to format your post?" section.
Make sure that lines of code do not exceed 80 characters when you format.
Indent the code, use code tags and align the columns in result.
Use the "Preview Message" button to verify.
Also always post your Oracle version with 4 decimals.

Regards
Michel

Re: Query [message #428956 is a reply to message #428948] Sat, 31 October 2009 02:06 Go to previous message
Michel Cadot
Messages: 63810
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
How Oracle can know if it is VikramKrishna or KrishnaVikram?

Regards
Michel
Previous Topic: How to initialize array
Next Topic: SQL text using SID
Goto Forum:
  


Current Time: Fri Sep 30 03:47:20 CDT 2016

Total time taken to generate the page: 0.09328 seconds