write a sql query following source?
subject mark
maths 30
science 20
social 80

requird output
maths science social
30 20 80

Answers were Sorted based on User's Feedback



write a sql query following source? subject mark maths 30 science 20 social 80 requird..

Answer / srikanth

select (select marks from sub where subject='maths') maths,
(select marks from sub where subject='science') science,
(select marks from sub where subject='social') social from
sub group by 1;

Is This Answer Correct ?    15 Yes 0 No

write a sql query following source? subject mark maths 30 science 20 social 80 requird..

Answer / brij

select
decode(subject,'maths',mark) maths
,decode(subject,'science',mark) science
,decode(subject,'social',mark) social
from <<table>>

Is This Answer Correct ?    5 Yes 3 No

write a sql query following source? subject mark maths 30 science 20 social 80 requird..

Answer / keshava

We can use pivot finction on 11g instead of multiple
decodes.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Informatica Interview Questions

how to duplicates from expression transformation without using sorter before that

1 Answers  


where to store informatica rejected data?

0 Answers  


I have a source as flat file and having data like ""TCS"MUMBAI" and i want output like TCS MUMBAI,the length of the data in the rows is variable.how can you fix it?

5 Answers   TCS,


source table have 3 records? and it is sucessfully loaded into target. and 4more records is added in to source .that means 7 records now in source. we have to load the remaining 4 records into the same trgt table with maintian top 3 records. how ?can any one give me the data flow of this logic plz?

5 Answers   Wipro,


how to work with mapplet designer in informatica?

7 Answers  






What is confirmed dimension with scenario

1 Answers   HCL,


How do you load first and last records into target table? How many ways are there to do it? Explain through mapping flows.

0 Answers  


how lookup is acting as both active and passive ? how is it possitble?

9 Answers   TCS,


What is the method of loading 5 flat files of having same structure to a single target and which transformations I can use?

8 Answers   TCS,


tell me some dimension tables names in banking domain informatica project(dont tell like depends on project, tell me names of dimension and fact table names in your project)?

3 Answers   IBM, Patni, TCS,


which quality process u can approach in ur project

1 Answers   CTS,


We can't use sql override or other properties when using Flat file as source. Then what is the use of Source Qualifier transformation?

3 Answers  


Categories