Hello All, Could any well write a query for the following
scenario.
Account(table name)
No Name Amount
1 ABCD 2000.00
2 DEFG -2000.00
3 GHIJ 3000.50
4 JKLM 4000.00
5 MNOP 6000.00
O/p Should be in this format
No Name Credit Debit
1 ABCD 2000.00 0
2 DEFG 0 -2000.00
3 GHIJ 3000.50
4 JKLM 0 -4000.00
5 MNOP 6000.00 o
could any one give appropriate query for this
Thnks in Advance
Suneel Reddy
Answer Posted / suresh kumar somayajula
Select No,Name,to_char(Sal,'$9999.99') amount from emp;
Is This Answer Correct ? | 0 Yes | 12 No |
Post New Answer View All Answers
Is left join same as inner join?
Show code of a cursor for loop.
What are pl sql procedures?
How to add a column ‘salary’ to a table employee_details?
Why left join is used in sql?
What is the difference between join and natural join?
What is orm in sql?
what are the properties and different types of sub-queries? : Sql dba
Why do we use joins in sql?
how to drop an existing index in mysql? : Sql dba
What is normalization in sql?
a table has 2 classifications 1)liabilities 2)earnings this liabitity has 2 elements with 2 input values and the earnings have 2 elements with 2 input values i wrote a query so that my input is liability savings amount1 amount2 xxxx null xxxxxx 0 xxx1 null xxxxx1 0 null yyyy 0 yyyy null yyy1 0 yyy1 my problem is --when i developed a report(d2k) with this data my o/p is liabilities,amount1,savings,amount2 xxxx xxxxxx xxx1 xxxxx1 yyyy yyyy yyy1 yyy1 how could i move this savings,savings values 2 palces up. can any body provide me witha better solution
What is pl sql variable?
what are the authentication modes in sql server? : Sql dba
Explain what is a column in a table?