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 / john bershan
@ mkumar.it
the query which you have posted will work if the amount
value is greater than zero and will not work in the case
when the vale s zero as it will throw divisor is equal to
zero.please check it.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Mention what is the plv (pl/vision) package offers?
Can you load data into multiple tables at once? : aql loader
What does the file extension accdb stand for?
Describe types of sql statements?
Why partition by is used in sql?
Are sql connections encrypted?
What is restrict in sql?
Can primary key be changed?
what is sp_pkeys? : Transact sql
What does the argument [or replace] do?
What is group by in sql?
Why do we need view in sql?
What is a variable in sql?
What is pessimistic concurrency control? : Transact sql
What is data modelling in sql?