Geeks Talk

Prepare for your Next Interview




Retrieve values in different format

This is a discussion on Retrieve values in different format within the Oracle forums, part of the Databases category; Question asked by visitor Navi Hi, I want to achive the following in PL/SQL or by using any other method Explanation select col1,col2 from table; Output will be ...


Go Back   Geeks Talk > Databases > Oracle

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 04-18-2007
Expert Member
 
Join Date: Feb 2007
Posts: 1,279
Thanks: 0
Thanked 164 Times in 138 Posts
Geek_Guest is on a distinguished roadGeek_Guest is on a distinguished road
Retrieve values in different format

Question asked by visitor Navi

Hi,
I want to achive the following in PL/SQL or by using any other method
Explanation

select col1,col2 from table;
Output will be
col1 col2
-------------
1 abc
2 xyz

but i want to get the display like below
col1 1 2
col2 abc xyz

How can i achive. Please ... thanks in advance
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 07-12-2007
Moderator
 
Join Date: Jun 2007
Location: Bangalore,India
Posts: 1,432
Thanks: 8
Thanked 125 Times in 112 Posts
debasisdas will become famous soon enoughdebasisdas will become famous soon enough
Re: Retrieve values in different format

try to write matrix query using DECODE function.
Reply With Quote
Reply

  Geeks Talk > Databases > Oracle


Thread Tools
Display Modes


Similar Threads

Thread Thread Starter Forum Replies Last Post
Retrieve data from emp table Sampurna SQL 4 08-13-2008 08:07 AM
Retrieve the detail from emp Geek_Guest Oracle 4 07-12-2007 07:20 AM
Query to retrieve the text fields Geek_Guest SQL 0 04-07-2007 12:51 AM
Help me retrieve my password joel MY SQL 1 12-19-2006 02:53 AM
Retrieve a pdf document from database Lokesh M Database General 5 12-18-2006 08:44 AM


All times are GMT -4. The time now is 12:55 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Copyright © 2008 GeekInterview.com. All Rights Reserved