PC Review


Reply
 
 
=?Utf-8?B?TWFya3Vz?=
Guest
Posts: n/a
 
      5th Apr 2005
I hope some one can help me i have this folling query and it gives me the
correct count for Record No for the month 1 and 2 but when it does the Dcount
for Elapse Time it gives only the count for Month 1 and for Month 2 it gives
me the exact ones as for Month 1 and not the ones for Month 2, could sone one
tell me what i am doing wrong

Regards Markus

SELECT Count([Record No]) AS [RecordNo], Dcount("[Elapse time required to
resolve]","New All Query","[Elapse time required to resolve]='Less Then 24
Hours'") AS [Elapsetime Less then 24 Hours]
FROM [New All Query]
Having (((Month([Date of Call]))=1));
Union All SELECT Count([Record No]) AS [RecordNo], DCount("[Elapse time
required to resolve]","New All Query","[Elapse time required to
resolve]='Less Then 24 Hours'") AS [Elapsetime Less then 24 Hours]
FROM [New All Query]
Having (((Month([Date of Call]))=2));
 
Reply With Quote
 
 
 
 
Carl Rapson
Guest
Posts: n/a
 
      5th Apr 2005
You need to move your Having clause into the DCount as a WHERE clause:

...."[Elapse time required to resolve]='Less Then 24 Hours' AND [Date of
Call]=1"

and

...."[Elapse time required to resolve]='Less Then 24 Hours' AND [Date of
Call]=2"

Otherwise, nothing differentiates the two DCount calls and you'll get the
same value for both calls.

Carl Rapson

"Markus" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I hope some one can help me i have this folling query and it gives me the
> correct count for Record No for the month 1 and 2 but when it does the
> Dcount
> for Elapse Time it gives only the count for Month 1 and for Month 2 it
> gives
> me the exact ones as for Month 1 and not the ones for Month 2, could sone
> one
> tell me what i am doing wrong
>
> Regards Markus
>
> SELECT Count([Record No]) AS [RecordNo], Dcount("[Elapse time required to
> resolve]","New All Query","[Elapse time required to resolve]='Less Then 24
> Hours'") AS [Elapsetime Less then 24 Hours]
> FROM [New All Query]
> Having (((Month([Date of Call]))=1));
> Union All SELECT Count([Record No]) AS [RecordNo], DCount("[Elapse time
> required to resolve]","New All Query","[Elapse time required to
> resolve]='Less Then 24 Hours'") AS [Elapsetime Less then 24 Hours]
> FROM [New All Query]
> Having (((Month([Date of Call]))=2));



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
A union B works, A union B union C fails Phil Smith Microsoft Access Queries 2 29th Nov 2006 06:50 PM
UNION vs UNION ALL =?Utf-8?B?cmFjaGFlbA==?= Microsoft Access Queries 1 31st Jul 2006 11:18 PM
Marshalling a struct (which contains a union and the union contains a struct ... also all the members are byte arrays) for Platform Invoke jsshah Microsoft C# .NET 1 22nd Jul 2006 03:11 AM
UNION or UNION ALL query question Olga Microsoft Access Queries 2 6th Apr 2006 08:49 PM
To union query or not to union query =?Utf-8?B?U2V0aCBTY2h3YXJt?= Microsoft Access Queries 2 4th Feb 2005 11:29 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:13 AM.