Solved

Seperate the rows

Posted on 2014-01-07
2
186 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
Comment Utility
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 31

Accepted Solution

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

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Salary Amount Format 13 56
Oracle Pivot 2 32
Calculating percentages per course - Oracle Query 3 26
Oracle TEXT search question 9 26
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…
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 how to recover a database from a user managed backup
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

763 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now