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 the use of count (*) in sql?
What is a primary key sql?
What is the trigger in sql?
what are the non-standard sql commands supported by 'mysql'? : Sql dba
What is a call statement? Explain with an example.
How many sql statements are used?
What is meant by <> in sql?
what is rdbms? : Sql dba
Where are my tempfiles, I don't see them in v$datafile or dba_data_file?
Is there any restriction on the use of union in embedded sql?
what is sub-query? : Transact sql
Why do we use partitions in sql?
How to write a single statement that concatenates the words ?hello? And ?world? And assign it in a variable named greeting?
Can a table contain multiple primary key’s?
Explain the uses of a database trigger?