Scenario is like this:
Name Sal
A 10;
B 20;
C 30;
Then Output should be
Name Sal
A 10;
B 20;
C 30;
Total 60;
Use SQL For this scenario
Answers were Sorted based on User's Feedback
Answer / niru
select name,salary from emp
union
select "total",sum(sal) from emp
| Is This Answer Correct ? | 11 Yes | 4 No |
Answer / kiran
SQL> select ename,sal from emp union select 'total:',sum(sal) from emp;
| Is This Answer Correct ? | 7 Yes | 0 No |
Answer / situ
first create a table emp4 using the above data then execute the below query to find that output
select case when grouping(name)=1 then 'Total'else name end as name,sum(sal) as sal from emp4 group by rollup(name);
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / pooja
Select case when GROUPING(e.Name)= 1
then'Total'else e.Name end as Name,
sum(e.Salary)as Salary from Emp e
group by e.Name with rollup
| Is This Answer Correct ? | 0 Yes | 0 No |
Plz can anybody send Informatica and Cognos FAQ Plz To thid ID ppradeep_dwh@ayhoo.co.in
Hi, I am new to Informatica, What is a flat file and how to use flat file in infomratica please help me.
In any project how many mappings they will use(minimum)?
According to his methodology what all you need before you build a datawarehouse
When will u go for Dynamic Cache and Persistent Cache? Pls explain with an example?
how to load first record of first time run,second record to 2nd time n 3rd record from 3rd time to target table
WHat all joins are there in Source Qualifier?
What is confirmed dimension and fact?
How do we come to know the Source data/file is ready/Updated in the source location, when the session is scheduled for @12:00AM and ready to run its job ? or Can we schedule the session, when the source is updated in source location without any time constraint?
My source is this year 01/jun/2014 04/may/2015 09/mar/2017 my desired output is day month ye 01 jun 2014 04 may 2015 09 mar 2017 how do i acheive this
what is meant by data driven.. in which scenario we use that..?
How can you recognise whether or not the newly added rows in the source r gets insert in the target ?