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 the purpose of the sql select top clause?

561


Is it possible to include an insert statement on the same table to which the trigger is assigned?

567


What is the difference between between and in condition operators?

545


Explain autonomous transaction.

644


How do I start sql from command line?

543






What is trigger in sql? Explain

544


What are the 3 types of behavioral triggers?

686


How to add, remove, modify users using sql?

576


What is a stored procedure in sql with example?

611


Why are cursors used?

589


what is the difference between undefined value and null value? : Sql dba

573


How to sort the rows in sql.

614


What is the order of sql select?

582


What is over () in sql?

533


What is trigger price?

552