Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

select from where not in (select...)

Status
Not open for further replies.

vlad123

Programmer
Jun 22, 2005
37
DE
I have a problem. I have 2 recordsets rs1 and rs2. I want to delete all records from rs1 that are in rs2 also, so just the records that I find in both recordsets.
and then to delete from a table all records that are in rs1.

rs1 = CurrentDb.OpenRecordset("SELECT DISTINCT dbo_link.url as url, query8.word as word FROM dbo_link, query8 WHERE (((dbo_link.url) Like '*' & query8.word & '*'));")

rs2 = CurrentDb.OpenRecordset("SELECT DISTINCT dbo_link.url as url, query9.word as word FROM dbo_link, query9 WHERE (((dbo_link.url) Like '*' & query9.word & '*'));")
I wanted to make a new query like this one :
select from where not in(select from )
but
Invalid Memo, OLE, or Hyperlink Object in subquery <name>. (Error 3342)
A subquery cannot return a Memo or OLE Object, and it cannot be compared to a Memo or OLE Object in an expression.
the column link from table url is memo type.
 
The sort of query you describe takes the form:
Code:
SELECT tblOne.*
FROM tblOne LEFT JOIN tblTwo ON tblOne.commonId = tblTwo.commonId
WHERE tblTwo.commonId Is Null;
Hope this is of help.

[pc2]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top