| busi |
Posted: Jan 23, 2007 06:40:30 AM |
Total Post: 13
Joined: Jan, 2007
|
HI Friends...I have got one quary...
For Example...i Created one table as Login with Amount and Usertype as Fields....
EX:
ID Amount UserType
1 2400 NGO
2 3000 Academic
3 4000 Academic
4 500 Foreign Delegate
1)Now i want to get sum of Foreign Delegate And Sum of Non Foreign Delegates
2) I want to get it in single quary
3)I don't want to use Union ....
Please Help Me.....
Regards
Narendra...
|
|
|
Vigyan |
| Posted: Jan 25, 2007 06:44:36 AM | |
|
Total Post: 386
Joined: May, 2001
|
It is not very clear what you are trying to achieve here. If you have multiple records of "Foreign Delegate" then can't you use sum function like this.
select sum(amount) from table where usertype = 'Foreign Delegate'
or
select sum(amount) from table where usertype <> 'Foreign Delegate'
Let me know if I have misunderstood your question.
- Vigyan
|
|
|
|
|
busi |
| Posted: Jan 25, 2007 06:57:30 AM | |
|
Total Post: 13
Joined: Jan, 2007
|
NO sir,That Table dosn't have multiple records for foreign Deligates...
|
|
|
|
|
| Time Zone: EDT |
Send this thread to your friend |