![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Oct 2005
Location: Texas
Posts: 11
Rep Power: 0
![]() |
Question about the SUM function in SQL
Hello,
If we have the following query (in ASP): rs.Open "SELECT SUM(salary) FROM employees WHERE salary > 55000",db1 Thanx for your help.
__________________
There are only two kinds of programming languages: those people always bitch about and those nobody uses. -- Bjarne Stroustrup |
|
|
|
|
|
#2 |
|
Professional Programmer
Join Date: Jun 2005
Location: India, The great.
Posts: 435
Rep Power: 4
![]() |
I think it'll return NULL. Also use 'as' in your query like
rs.Open "SELECT SUM(salary) as total FROM employees WHERE salary > 55000",db1 then you can use it in further expressions. Also, Animated avatars are not allowed on this forum. So change your avatar. Edit: MyPosts%100==0! ![]()
__________________
PFO - My daily dose of technology. |
|
|
|
|
|
#3 |
|
Professional Programmer
Join Date: Jun 2005
Location: India, The great.
Posts: 435
Rep Power: 4
![]() |
Anyways, Welcome to the forums.
![]() One good thing to do after you join a forum is read the Forum Rules.
__________________
PFO - My daily dose of technology. |
|
|
|
|
|
#4 |
|
Newbie
Join Date: Oct 2005
Location: Texas
Posts: 11
Rep Power: 0
![]() |
Thanx
Thanx for your help and thanx for the info...
I already changed the avatar... ![]()
__________________
There are only two kinds of programming languages: those people always bitch about and those nobody uses. -- Bjarne Stroustrup |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|