sql - Trying to search a field with or without dashes in a query? -
I have a table (table.foo) where I'm trying to search for a specific area. I have an MS Access Form that uses SQL Query to output results. I have a user who wants to search for this field
If I use a simple select query
SELECT foo from table WHERE foo LIKE '% xyz% ' I will get a string with XI, but if the user searches for X-Ways, they will not get any record where table.fu =' XIZE ' / Code> Return the results regardless of the presence of a dash in the search string How do I configure a query? I know that I can copy table.fu columns and create a table. You can strip the dash from the Foo-Search column and the new field, but it seems that this place will be useless useless and plus it will need to maintain a second column in the database.
Here you can go:
Select foo from the table OUTPUT: x-Yz
Comments
Post a Comment