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
What is data manipulation language?
What is db journal file?
What are the benefits of pl/sql packages?
Do stored procedures prevent sql injection?
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
How delete a row in sql?
What are the built in functions of sql?
Is a secondary key the same as a foreign key?
How exception handling is done in advance pl/sql?
What is blind sql injection?
how to get a list of columns in an existing table? : Sql dba
how many sql ddl commands are supported by 'mysql'? : Sql dba
Difference between global and parameter variables?
What is having clause in sql?
What is snowflake sql?