Your query is missing a space after
FROM. The resulting query would look like
SELECT Name FROMAccount WHERE ...
This is a very easy error to make, and is why I always recommend using
String.format() to build Dynamic SOQL queries, as I mentioned on one of your previous questions.
You are also using Apex binding incorrectly. An Apex bind takes the form
:VARIABLE, as in
WHERE My_Field__c IN :collectionOfValues. Your query adds the literal string value of the variable after the binding colon, which will produce confusing errors at run time.
I strongly recommend that you take the time to read through the entirety of Salesforce's SOSL and SOQL Reference. Your questions indicate that you are working on a project involving a lot of complex querying. You need to establish a foundation in how these query languages work in order to do so effectively.