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
define sql insert statement ? : Sql dba
Can we use distinct and group by together?
Is inner join faster than left join?
What is the current version of postgresql?
how to start mysql server? : Sql dba
what is dbms? : Sql dba
Is primary key clustered index?
Can we rollback truncate?
What is the best sql course?
what is schema? : Sql dba
how to escape special characters in sql statements? : Sql dba
what are all the common sql function? : Sql dba
what is sql server agent? : Sql dba
What is the current version of sql?
what is bcp? When does it used? : Sql dba