Sub-Query

  • Thread starter Thread starter JPM
  • Start date Start date
J

JPM

They don't seem to be working in Access 2K. I know I've used them before.

E.g.:

Delete * from tblX where tblX.Name = (Select tblY.Name From TblY)

The help file example seems to indicate this would work. So does my past
Access experience and my experience with T-SQL. What am I missing today?


Thanks for the help.

JPM
 
Try using "In" instead of =. For example:

Delete * from tblX where tblX.Name In (Select tblY.Name
From TblY)

David
 
That might help.
My actual case involves a multi-column table. Referring to an older version
of Access, I found it defaulted the query to include the DISTINCTROW
keyword. Using the same keyword in Access 2K resolved the issue.

Thanks,
JPM
 
hi
you can write sql follwed
Delete * from tblX where tblX.Name = ANY (Select tblY.Name
from tblY)
 
Back
Top