This expression is typed incorrectly, or is too complex to be evaluated

polo

Registered User.
Local time
Today, 01:56
Joined
Feb 23, 2006
Messages
19
Hey guys,

I am getting this error "This expression is typed incorrectly, or is too complex to be evaluated"

For this query:
SELECT first([TblProp].[Name]) AS [SName], First([TblProp].[CommentDate]) AS DateCommented, First([TblProp].[No]) AS BNum, First([TblProp].[Indication]) AS Ind, First([TblProp].[PropSubmitted]) AS DateSub, First([TblProp].[Contact]) AS PrimCon, First([TblProp].[Prepared]) AS PrepName, First([TblProp].[Comment]) AS Comment,First([TblProp].[Value]) AS ValueNew, First([TblProp].[Rating]) AS Prob
FROM TblProp
GROUP BY [TblProp].[RFPNo];

This query had been working fine for a good long time, but suddenly it starts throwing up this message. I haven't changed anything at all with this query. Its very puzzling. I went through each of the fields and its the comment field that is causing the problem.

Would anyone have any ideas on why this might be happening?

Thanks for reading this!

Polo
 
Why are you using function First()? It looks like a select query? If you're not doing any totaling or averaging in this query, you don't need to use First or other aggerate function. To right them all, right click on the query building editor, and click on "Totals" which has a ∑ icon next to it, click it to disable it, then it'll revert to a simple select query.
 
Banana said:
Why are you using function First()? It looks like a select query? If you're not doing any totaling or averaging in this query, you don't need to use First or other aggerate function. To right them all, right click on the query building editor, and click on "Totals" which has a ∑ icon next to it, click it to disable it, then it'll revert to a simple select query.


Hi Banana,

I'm using first because there are exact duplicates in the table.... perhaps this should be done a different way?

Thanks

Polo
 
Yes.

What do you want?

No duplicates?

Open up the query's properties (from right click menu) and select "Unique Records"

This will change the sql from SELECT to SELECT DISTINCT and will return only unique records.

Duplicates only?

There's a wizard for that; in database windows, click "New" button, then select the Find Duplicate Wizard.

That said, why do you have duplicates? I'm worried that the database design may be flawed...

HTH.
 
Banana said:
Yes.

What do you want?

No duplicates?

Open up the query's properties (from right click menu) and select "Unique Records"

This will change the sql from SELECT to SELECT DISTINCT and will return only unique records.

Duplicates only?

There's a wizard for that; in database windows, click "New" button, then select the Find Duplicate Wizard.

That said, why do you have duplicates? I'm worried that the database design may be flawed...

HTH.


Thanks Banana for your help. I have ammended the query now, although it runs alot slower now :-(

Since I modified I am not getting a different error message:

The microsoft jet database engine stopped the process because you and another user are attempting to change the same data

Would anyone know what could be causing this?

Thanks
 
Is the database on a network or your personal PC?
 
Hi KeithG,

The database is on a network... any info much appreciated!

:-)
 

Users who are viewing this thread

Back
Top Bottom