Creating a new column from another column

NLugo

Registered User.
Local time
Today, 14:00
Joined
May 7, 2002
Messages
10
Hope you can help me out with this one...

I created a column in my query called "Clerical" in which Iam adding fields that pertained to clerical staff. However, the problem is,I need to create another column called "Part-Time" which has to look for anyone who is clerical then the formula needs to add other fields. Below is the function I created but it doesn't work, I get a aggregate function error.

Part-time: IIf([Clerical]>0,[HeadcountTable]![PFT ]+[HeadcountTable]![PPT ],"Zero")

Please help!

Thank you!
 
Use your ddefinition in a neew field in your query. You're already there. The new field is "Part Time."
 
I did create a new field called "Part Time" but I received an Aggregate function error. What did I do wrong?
 
You receive an Aggregate Function error when you're using a so-called Aggregate Function.
Aggregation (AKA as GROUP)Functions are used to run statistical calculations.

If you're using a GROUP Function, you'll have to add this basic line at the end of your SQL statement (query):

GROUP BY column1, column2,...,columnX

In the GROUP BY you'll have toe refer to each column used to select data from.
You except the column used in your GROUP Function as long as it's not referred to without the GROUP function.

Example:

SELECT column1, column2, SUM(column3)
FROM Table
GROUP BY column1, column2;

RV
 

Users who are viewing this thread

Back
Top Bottom