write a query following table

bookid language
1234 english
1234 french
1234 spanish
1235 english

i want the output are

bookid lang1 lang2 lang3
1234 english french spanish
1235 english null null

Answer Posted / tgin

SELECT BOOKID,DECODE(LANGUAGE,'ENGLISH') AS LANGUAGE1,
DECODE(LANGUAGE,'FRENCH') AS LANGUAGE2,
(LANGUAGE,'SPANISH') AS LANGUAGE3
FROM TABLE_NAME
GROUP BY BOOKID

Is This Answer Correct ?    4 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can informatica load heterogeneous targets from heterogeneous sources?

693


One of the optimizing technique to improve the session performance is push down optimization,by using push down optimization we push as much as transformation logic to source/target database,but this degrades the d/b performance,how to overcome this?

1747


How to display session logs based upon particular dates. If I want to display session logs for 1 week from a particular date how can I do it without using unix. ?

1599


What are the components of the workflow manager?

635


Which is the t/r that builts only single cache memory?

706






Write the unconnected lookup syntax and how to return more than one column.

590


What is incremental aggregation?

572


What are active and passive transformations?

647


What's the layout of parameter file (what does a parameter file contain?)?

1913


What is Cognos script editor?

3782


While migrating the data from one environment to another environment how would you manage the connections?

623


How do you load only null records into target?

738


Debugger what are the modules, what are the options you can specify when using debugger, can you change the expression condition dynamically when the debugger is running.

1866


Implementation methodology

1258


have u done any performance tuning? how u ll do?

1853