Wildcard in subquery
Posted on 2005-02-25
Hello, experts! I'm trying to do a wildcard in a subquery:
WHERE (((tblOrders.txtTrailerID) In (Select txtTrailer From tblTrailers As T Where T.txtTrailer Like tblOrders.txtTrailerID)));
But I want to return all values where tblOrders.txtTrailerID contains any matching part of T.txtTrailer. For example, I want to return tblOrders.txtTrailerID = trailer1 when there is a record for tblTrailers.txtTrailer = trailer12. I hope that makes sense. I've tried "... Where T.txtTrailer Like * tblOrders.txtTrailerID *", and variations thereof, and received errors.