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


Please Help Members By Posting Answers For Below Questions

What is a column in a table?

547


how to create a test table in your mysql server? : Sql dba

492


Is sql a oracle?

521


How can I tell if sql is running?

584


What steps server process has to take to execute an update statement?

506






What is difference between sql and excel?

513


What are the possible values that can be stored in a boolean data field?

513


What is autocommit sql?

538


What is bitemporal narrowing?

720


What are instead of triggers?

620


What is the difference between count 1 and count (*) in a sql query?

495


Determine if oracle date is on a weekend?

552


how many ways to get the current time? : Sql dba

526


How to load data with sql*loader?

548


How do I count duplicates in sql?

543