Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 use of count (*) in sql?

1119


What is a primary key sql?

1093


What is the trigger in sql?

1004


what are the non-standard sql commands supported by 'mysql'? : Sql dba

1176


What is a call statement? Explain with an example.

1071


How many sql statements are used?

1073


What is meant by <> in sql?

1029


what is rdbms? : Sql dba

1066


Where are my tempfiles, I don't see them in v$datafile or dba_data_file?

1057


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

1200


what is sub-query? : Transact sql

1161


Why do we use partitions in sql?

1096


How to write a single statement that concatenates the words ?hello? And ?world? And assign it in a variable named greeting?

1147


Can a table contain multiple primary key’s?

1156


Explain the uses of a database trigger?

1089