As a continuation to my last post, I'm finding that when I use the LIKE '*' command, I don't always get consistent results. From looking in to it, I have a feeling that it's where I am concatenating my results for WHERE, and one thought was that I might need to use some prepared statement ahead of time, and feed it in to my WHERE later. Looking online, I haven't had much luck with this, so I was wondering if there was a way to solve my problem, or if there's a way to modify my WHERE line to get me consistent results.
Code:
SELECT Database.Description, Database.[Part Number], Database.Manufacturer, Database.Symbol, Database.[Job Number], Database.File, Database.DirectoryFROM [Database] INNER JOIN (SELECT Database.[Job Number] FROM [Database] GROUP BY Database.[Job Number] HAVING (((Sum([Symbol]=[Enter First Symbol] Or [Symbol]=[Enter Second Symbol]))=-2))) AS qry1 ON Database.[Job Number] = qry1.[Job Number]
WHERE (((Database.Symbol) LIKE '*' + [Enter First Symbol] + '*')) OR (((Database.Symbol) LIKE '*' + [Enter Second Symbol] + '*'))
ORDER BY Database.File;