Solved

Seperate the rows

Posted on 2014-01-07
2
192 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 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article started out as an Experts-Exchange question, which then grew into a quick tip to go along with an IOUG presentation for the Collaborate confernce and then later grew again into a full blown article with expanded functionality and legacy…
I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines
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…

724 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