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

Can pl sql procedure have a return statement?

646


Can function return multiple values in sql?

633


Is there any restriction on the use of union in embedded sql?

783


What is a temporal table?

583


Is there a 64 bit version of ssms?

601






How does an execution block start and end in pl sql?

583


What is sql profiling in oracle?

643


What is t sql in sql server?

652


What is embedded sql in db2?

612


Does sql require a server?

617


Can we use distinct and group by together?

688


Why do we create stored procedures & functions in pl/sql and how are they different?

593


What are the types of join in sql?

602


Why we use sql profiler?

644


What are analytical functions in sql?

632