You can use Replace in where clause to check spaceless version of A1
SELECT * FROM your_table
WHERE A1 LIKE '% %'
AND REPLACE(A1,' ','') IN (SELECT B1 FROM Table 2)
Question
Is it possible to check if a table field contains spaces (one or multiple spaces) by using an MS-Access query? (if yes, how?)
I would to know if the A1 field of Table1 contains spaces and check if it without spaces is equal to field B1 of Table2 (without changing the tables data).
I've MS-Access 2007.
EDIT
Correct answer for MS-Access 2007:
SELECT DISTINCT your_table1.id FROM your_table1, your_table2
WHERE A1 LIKE '* *'
AND REPLACE(A1,' ','') IN (SELECT B1 FROM your_table2)
Solution
You can use Replace in where clause to check spaceless version of A1
SELECT * FROM your_table
WHERE A1 LIKE '% %'
AND REPLACE(A1,' ','') IN (SELECT B1 FROM Table 2)