Solved

Seperate the rows

Posted on 2014-01-07
2
189 Views
Last Modified: 2014-01-13
Hi,
i have data which looks like below

Table a

code  text                                  lang

101    North America                   E  
102   l'amérique du nord              F


I want output as  

code  text _english      text_french                       lang

101    North America                                               E  
102                             l'amérique du nord              F


how can i do that.

Thanks
0
Comment
Question by:sam2929
2 Comments
 
LVL 14

Expert Comment

by:Farzad Akbarnejad
ID: 39763967
Hello,
Suppose you have your data in tblTest. Write the following query to get proper result:

select t.code, case when lang='E' then text end text_english,
               case when lang='F' then text end text_french,
       t.lang
 from tblTest t

Open in new window

-FA
0
 
LVL 32

Accepted Solution

by:
awking00 earned 500 total points
ID: 39765456
select code, decode(lang,'E',text) as text_english, decode(lang,'F',text) as text_french, lang
from tablea;
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to Create User-Defined Aggregates in Oracle Before we begin creating these things, what are user-defined aggregates?  They are a feature introduced in Oracle 9i that allows a developer to create his or her own functions like "SUM", "AVG", and…
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question