add a field to count

kidrobot

Registered User.
Local time
Today, 13:48
Joined
Apr 16, 2007
Messages
408
How can I add a field that just populates "1" for each record so I can do a count. I know I can count based on a specific field but my boss wants to see a field that just shows "1" so I can SUM it up in another query.
 
Tell your boss he is an idiot and what he wants you to do is absurd.
 
If you really want to do it open your table in design mode, add a column and set the default value to 1.
 
Tell your boss he is an idiot and what he wants you to do is absurd.

lol... he is going to be maintaining this database after I leave and he is used to counting his records like this. So if I can do this in a query let me know!!
 
Surely it is simpler to just put CountofRecords: Count(*) in the query grid?

Brian
 
lol... he is going to be maintaining this database after I leave and he is used to counting his records like this. So if I can do this in a query let me know!!

You can add the column using the query but, AFAIK, you can't set a default value.

Instead of doing this spend 15 minutes explaining to your boss how he can get a count without a column full of ones.
 
1. Open EXCEL Help.

2. Find the section on functions.

3. Print the help on the SUM function.

4. Now print the help on the COUNT function.

5. Explain to the chowderhead that even EXCEL doesn't need a SUM all of the time.

6. Immediately leave the room just in case his brain explodes from having too much data in it at one time.

7. As a precaution, the day you are going to do this... wear older clothes in case his brain-burst involves a large splatter factor.
 
How can I add a field that just populates "1" for each record so I can do a count. I know I can count based on a specific field but my boss wants to see a field that just shows "1" so I can SUM it up in another query.

If you really must add a column to your query like the following, it will append 1 as a field to each record

COUNT:1
 

Users who are viewing this thread

Back
Top Bottom