Re: how do I get rid of "the expression you entered exceeds the 1,024-

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



On 17 Apr, 20:55, KARL DEWEY <KARLDE...@xxxxxxxxxxxxxxxxxxxxxxxxx>
wrote:
You could use more aliases but I see other problems.  
In your SELECT you have T.IndicatorID and then in the GROUP BY  
IndicatorID]. AS T -- You have a closing bracket without an opening one.  It
also is followed by a period.  And it makes an alias T of what appears to be
a field.

--
KARL DEWEY
Build a little - Test a little



"annysjunkm...@xxxxxxxxxxxxx" wrote:
Folks,
I extended the SQL below (original SQL designed by a user from this
newsgroup) but it always returning a the error msg "the expression you
entered exceeds the 1,024-character limit for the query deisgn grid".

Can someone suggest a workaround or how to get rid of error msg as I
haven't got the foggiest!

SELECT DianesBSPTourismqry.ApplicationRefNo, Y.ActualQtrDate,
Y.ActualindicatorName, Y.ActualIndicatorValue,
DianesBSPTourismqry.Programme,
DianesBSPTourismqry.OperationalProgrammeName,
DianesBSPTourismqry.PriorityName, DianesBSPTourismqry.Priority,
DianesBSPTourismqry.Measure, DianesBSPTourismqry.MeasureDescription,
DianesBSPTourismqry.DestDescription, tblRDPApplication.JobsCreated,
T.IndicatorID
FROM ((tblProjectActualIndicator AS Y INNER JOIN [SELECT
ApplicationRefNo, IndicatorID, Max(ActualQtrDate) as MaxQ
    FROM tblProjectActualIndicator
    GROUP BY  ApplicationRefNo, IndicatorID]. AS T ON
(Y.ApplicationRefNo = T.ApplicationRefNo) AND (Y.IndicatorID =
T.IndicatorID) AND (Y.ActualQtrDate = T.MaxQ)) INNER JOIN
DianesBSPTourismqry ON Y.ApplicationRefNo =
DianesBSPTourismqry.ApplicationRefNo) INNER JOIN tblRDPApplication ON
Y.ApplicationRefNo = tblRDPApplication.ApplicationRefNo
WHERE (((Y.ActualindicatorName) Like "*jobs*"));

Thanks
Chris- Hide quoted text -

- Show quoted text -

Thanks for your reply Karl,
The initial query was written by a member from this Group (sorry can't
recall name).
This is the exact SQL...

SELECT Y.ApplicationRefNo, Y.ActualQtrDate, Y.ActualindicatorName,
Y.ActualIndicatorValue
FROM tblProjectActualIndicator AS Y INNER JOIN [SELECT
ApplicationRefNo, IndicatorID, Max(ActualQtrDate) as MaxQ
FROM tblProjectActualIndicator
GROUP BY ApplicationRefNo, IndicatorID]. AS T ON (Y.ActualQtrDate
= T.MaxQ) AND (Y.IndicatorID = T.IndicatorID) AND (Y.ApplicationRefNo
= T.ApplicationRefNo);

...you can see where I added in additional tables fields

You can also see the closing bracket and period were originally
written by the Author and not by me.
I am not sure what to do really. This is an excellent query for what
it does, it reads down a list of targets and select the most recent
only for an Application. I need to add more information for
mamangement reporting purposes. I would consider myself to be an
average user of Access but the complexity of this query (and aliases)
are beyond me.

I am hoping you may some thoughts as to a solution as I don't know how
to code it myself.

Thanks
Chris
.



Relevant Pages