Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 03-11-2005, 06:44 AM   #1 (permalink)
kus
Registered User
 
Join Date: Mar 2005
Posts: 2
kus is on a distinguished road
Sum Column Problem!?!?

How can i sum half column from access database. This is an example.. I want to sum just the one in bold.. Can u help me on this?

Hrs
3
4
5
7
8
3
4
6
kus is offline   Reply With Quote
Old 03-11-2005, 08:45 AM   #2 (permalink)
technobard
Centurion Nova Prime
 
technobard's Avatar
 
Join Date: May 2002
Location: Oak Park, IL (USA)
Posts: 285
technobard is on a distinguished road
I think you want to take a look at the "TOP N" clause as in:
SELECT TOP N WHERE ...

The catch is that you have to know the value of N before hand. There is probably a way to use subqueries to put it together. My MS Access is pretty rusty. Anyway, if you create the TOP N query first and then use it as a source for a second query, you should be able to compute the sum that you want.
__________________
It takes 2 points to draw a straight line, but at least 3 points to draw a conclusion.
technobard is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hashing problem jodders Standard C, C++ 1 02-09-2005 01:51 PM
Problem Assignment (Urgent help req.) Boltress Standard C, C++ 0 01-12-2005 07:59 AM
making a 3 column table dynamically sde PHP 8 08-28-2004 07:14 PM
Help debugging a power problem Belisarius Lounge 0 10-25-2003 04:44 PM


All times are GMT -8. The time now is 08:32 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting