Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Seperate the rows

Posted on 2014-01-07
2
Medium Priority
?
194 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 2000 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

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.
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…

610 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