delete qry

dz2k7

Not only User
Local time
Today, 04:13
Joined
Apr 19, 2007
Messages
104
Hi,

I have a qry like this.

DELETE T1.*
FROM Table1 AS T1
WHERE Item =
(SELECT Item
FROM Table2 AS T2
)
WITH OWNERACCESS OPTION;

It deletes lines from one table picking items from another table.

I copied it from another database where it worked fine.

Now i have a message

"At most one record can be returned by this subquery."

I checked both tables for duplicates and there is non of them.

Help does not give me much:

-----------
At most one record can be returned by this subquery. (Error 3354)

A subquery of this kind cannot return more than one record. Revise the SELECT statement of the subquery to request only one record.

----------
Does anybody has a version why I got that?

Thanks.
 
Try changing "=" to "IN"
 
WOW
That worked
Thanks a lot.
 

Users who are viewing this thread

Back
Top Bottom