Mulitiple Records fro mthe same table ?

P

Paul Dennis

I am trying to workout the total time within a month that a type of server
has been unavailable, which is proving dificult.

Table: PROBLEMS
FIELDS:

PROBLEM_ID
TYPE
OPEN DATE_TIME
CLOSED DATE_TIME

I can select all the problems for TYPE="SERVER" and all the problems that
month, but how to calculate the total open time which ticket b might
start/stop within ticket a start/stop hence should be discarded from the
calc, or ticket c starts aftr ticket a but finishes after hence should be
countered as ticket a start and ticket c stop. The amount of tickets of the
TYPE="SERVER" could be 1 or many.

Help - I just can't get my head around the query?
 
K

KARL DEWEY

Create a totals query.
Create field Month([OPEN DATE_TIME])&Year([OPEN DATE_TIME])
Change the Group By to WHERE.
Put Month(Date())&Year(Date()) in criteria.

Create field Month([CLOSED DATE_TIME])&Year([CLOSED DATE_TIME])
Change the Group By to WHERE.
Put Month(Date())&Year(Date()) in criteria.

Select field TYPE. Change the Group By to WHERE. Put SERVER in criteria.

Create a column named Monthly Total. Change the Group By to SUM.
Monthly Total: [CLOSED DATE_TIME] - [OPEN DATE_TIME]
 
K

KARL DEWEY

I was a bit hasty in my reply. It does not account for all factors this data
can entail.

KARL DEWEY said:
Create a totals query.
Create field Month([OPEN DATE_TIME])&Year([OPEN DATE_TIME])
Change the Group By to WHERE.
Put Month(Date())&Year(Date()) in criteria.

Create field Month([CLOSED DATE_TIME])&Year([CLOSED DATE_TIME])
Change the Group By to WHERE.
Put Month(Date())&Year(Date()) in criteria.

Select field TYPE. Change the Group By to WHERE. Put SERVER in criteria.

Create a column named Monthly Total. Change the Group By to SUM.
Monthly Total: [CLOSED DATE_TIME] - [OPEN DATE_TIME]

Paul Dennis said:
I am trying to workout the total time within a month that a type of server
has been unavailable, which is proving dificult.

Table: PROBLEMS
FIELDS:

PROBLEM_ID
TYPE
OPEN DATE_TIME
CLOSED DATE_TIME

I can select all the problems for TYPE="SERVER" and all the problems that
month, but how to calculate the total open time which ticket b might
start/stop within ticket a start/stop hence should be discarded from the
calc, or ticket c starts aftr ticket a but finishes after hence should be
countered as ticket a start and ticket c stop. The amount of tickets of the
TYPE="SERVER" could be 1 or many.

Help - I just can't get my head around the query?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top