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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Insert Into Problem 2
Programmatically determinae the field name referenced by query par 2
sub query 16
join table query 2
Open query based upon a table selected 1
sub-query 1
Sub-Query 2
binary data from SQLSRVER 1

Back
Top