DEAR,
i have a table with employee ID name date from, date to, total days,
type of leave"annual, sick"
i have a query for total days
how can i get total annual taken by ID
and total sick taken by ID
ID from Till Total Days Leave Type
5001 1/1/2009 1/5/2009 Annual
5002 1/11/2009 1/20/2009 Sick
5001 1/11/2009 1/20/2009 Annual
Best Regards
|
|
0
|
|
|
|
Reply
|
Tia
|
11/17/2009 11:12:59 AM |
|
On Tue, 17 Nov 2009 03:12:59 -0800 (PST), Tia
<tia.abdelkarim@gmail.com> wrote:
[Total Days] is a calculated column and does not belong in a
relational database. Rather you should delete this field, and then
create a query on this table with an extra column for [Total Days]
(which I will call TotalDays because I hate these extra brackets) with
an expression to calculate the days:
TotalDays: DateDiff('d', From, Till)
I think "From" may also be a reserved word; let's rename those two
fields to LeaveFrom and LeaveTill
TotalDays: DateDiff('d', LeaveFrom, LeaveTill)
Now you can create a new query based on this query and turn on the
Group By feature with the Sigma button, and group by ID and sum by
TotalDays.
-Tom.
Microsoft Access MVP
>DEAR,
>
>i have a table with employee ID name date from, date to, total days,
>type of leave"annual, sick"
>i have a query for total days
>how can i get total annual taken by ID
>and total sick taken by ID
>
>ID from Till Total Days Leave Type
>5001 1/1/2009 1/5/2009 Annual
>5002 1/11/2009 1/20/2009 Sick
>5001 1/11/2009 1/20/2009 Annual
>
>
>Best Regards
|
|
0
|
|
|
|
Reply
|
Tom
|
11/17/2009 2:08:09 PM
|
|
Also group by Leave Type.
--
Daryl S
"Tom van Stiphout" wrote:
> On Tue, 17 Nov 2009 03:12:59 -0800 (PST), Tia
> <tia.abdelkarim@gmail.com> wrote:
>
> [Total Days] is a calculated column and does not belong in a
> relational database. Rather you should delete this field, and then
> create a query on this table with an extra column for [Total Days]
> (which I will call TotalDays because I hate these extra brackets) with
> an expression to calculate the days:
> TotalDays: DateDiff('d', From, Till)
>
> I think "From" may also be a reserved word; let's rename those two
> fields to LeaveFrom and LeaveTill
> TotalDays: DateDiff('d', LeaveFrom, LeaveTill)
>
> Now you can create a new query based on this query and turn on the
> Group By feature with the Sigma button, and group by ID and sum by
> TotalDays.
>
> -Tom.
> Microsoft Access MVP
>
>
> >DEAR,
> >
> >i have a table with employee ID name date from, date to, total days,
> >type of leave"annual, sick"
> >i have a query for total days
> >how can i get total annual taken by ID
> >and total sick taken by ID
> >
> >ID from Till Total Days Leave Type
> >5001 1/1/2009 1/5/2009 Annual
> >5002 1/11/2009 1/20/2009 Sick
> >5001 1/11/2009 1/20/2009 Annual
> >
> >
> >Best Regards
> .
>
|
|
0
|
|
|
|
Reply
|
Utf
|
11/17/2009 5:58:07 PM
|
|
|
2 Replies
174 Views
(page loaded in 0.073 seconds)
Similiar Articles: Leaving a total sum cell blank until other cells are filled ...Leave Blank if No Value - microsoft.public.excel.misc Leaving a total sum cell blank until other cells are filled ... Leave Blank if No Value - microsoft.public.excel.misc ... Leave Blank if No Value - microsoft.public.excel.miscHi I am trying to use the below formual =IF(B17="","",B6:B17) But it is only giving me the value in B17 rather that the total from B6 to B... Pivot Table - move Totals column - microsoft.public.excel.misc ...Excel Pivot Table Tutorial -- Grand Totals Excel Pivot Table grand total is at bottom by ... Grand Total or leave the column blank, except for the heading. Pivot: grand totals - microsoft.public.excel.programming ...Excel Pivot Table Tutorial -- Grand Totals Excel Pivot Table grand total is at bottom by ... Grand Total or leave the column blank, except for the heading. Total for Cells with same name value - microsoft.public.excel ...Input cell should display a percentage of input value in the cell ..... to change B1:B700(but want to leave one cell for sum total in ... that when we enter a number in ... Autosum doesn't work. How do I get column total? - microsoft ...The column I need to total seems to > have a fault, and autosum doesn't work. ... Find (single space) and replacing with (leave box empty). I see this when ... Full Inbox - microsoft.public.windows.live.mail.desktop ...That is the mailbox on your server, not the WLMail Inbox. Tools | Accounts | Mail | Properties | Advanced - Uncheck: Leave a copy of messages on the server. Creating an End of Year total Query. - microsoft.public.access ...Leave out the price per barrel and Month, and add the calculated column. ... since the price changes every month, I need a query that will > give > 1 grand total ... Input cell should display a percentage of input value in the cell ...Please read the below discussion and suggest an answer Many thanks for ur answer what if i want to change B1:B700(but want to leave one cell for sum total in every ... How do I leave emails on the server so Blackberry Internet Servic ...If the email client does not leave email messages on the server, the BlackBerry ... I'm a total newby to this. OK, I found "Advanced E-mail Options" Once there, couldn ... Total Eclipse Magazine - Homecompilation filled with the hottest international artists emailed right to you!! MARINE CORPS TOTAL FORCE LEAVE AND EARNINGS STATEMENTa id info 1 name (last, first, mi) schmoe, joe a 2 ssn *****1234 3 rank 4 serv usmc 5 plt code 6 date prep 20080521 7 prd covered 1-31may 8 pebd 19920720 9 ... Leave (vacation, sick, etc.) - Colorado.gov: The Official State ...As part of its total compensation package, the State of Colorado currently offers employees a comprehensive leave program that includes annual, sick, holiday, family ... No. 8: Bumble and Bumble Leave In Conditioner, $23, 8 Best Leave ...No. 8: Bumble and Bumble Leave In Conditioner, $23, 8 Best Leave-In ConditionersTotalBeauty.com average reader rating: 8.3* Why: Readers call this Intermittent FMLA Leave | HrHero.com HR TopicsIt is a change in the employee’s schedule for a period of time, normally from full-time to part-time. Employees must show the medical necessity for intermittent leave ... 7/20/2012 8:37:26 AM
|