Re: Query Problem-“You tried to execute a query that does not include

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: MGFoster (me_at_privacy.com)
Date: 03/16/05


Date: Wed, 16 Mar 2005 03:51:43 GMT


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

You have this expression in the SELECT clause:

   [DR2]![Response]/Max([DR2]![Response]))*([Weights]![MaxWeight]

It must also be in the GROUP BY clause.

BTW, The connector between a table reference and a column name is a
period not an exclamation mark.

-- 
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)
-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv
iQA/AwUBQjetTIechKqOuFEgEQL0ZwCeKQ5IlBesBJ8WSc+ocJeK9XFBnHMAn0pP
meTDcc1NbHNaFRXHuJEF78Qy
=DILZ
-----END PGP SIGNATURE-----
The Chad wrote:
> Hi All,
> 
> I am trying to run a query and every time I try I get an error message that 
> says:
> “You tried to execute a query that does not include the specified expression 
> ‘[DR2]![Response]/Max([DR2]![Response]))*([Weights]![MaxWeight]’ as part of 
> an aggregate function”
> 
> I have done some general internet research and referenced the Access books I 
> have here and still not clarity on what the issue is.  Do any of you have any 
> thoughts?


Relevant Pages

  • Re: someone please explain why this (nonsensical) query works!
    ... For each field in a query, Access keeps track of the SourceTable. ... As you point out, it is inconsistent (doesn't work in the FROM clause.) Worse, it opens the door for bugs where the alias may not be interpreted correctly. ... fails -- this modification attempts to reference tbl2 in the 'from' clause: ...
    (microsoft.public.access.queries)
  • Re: someone please explain why this (nonsensical) query works!
    ... or by dropping all reference to tbl1 -- I can ... If you need to take this one step further, create a new query: ... That explains how JET is able to parse the WHERE clause. ... opens the door for bugs where the alias may not be interpreted correctly. ...
    (microsoft.public.access.queries)
  • Re: Query is too complex
    ... As you seem to have a reference ... I will say that Access will mangle this query into unreadability and complexity ... = SomeControl or SomeControl is Null ... clause increases rapidly. ...
    (microsoft.public.access.queries)
  • Re: someone please explain why this (nonsensical) query works!
    ... If you need to take this one step further, create a new query: ... That explains how JET is able to parse the WHERE clause. ... opens the door for bugs where the alias may not be interpreted correctly. ... reference in the 'where' clause be to qr1.field1? ...
    (microsoft.public.access.queries)
  • RE: Any good T-SQL quick reference recommended?
    ... The full syntax of the SELECT ... SELECT Clause ... Specifies the columns to be returned by the query. ... Specifies that duplicate rows can appear in the result set. ...
    (microsoft.public.sqlserver.programming)