I am trying to run a query against a database by selecting only specific accounts, but I'm running into some issues.The naming convention of the accounts varies and my query runs correctly for some but not others. For accounts containing spaces or other characters there seems to be an issue, whereas accounts that do not contain these work fine.
If two different accounts are named as such:
2. AccountName AccountNumber-SubAccount
If I use: where account = `AccountNameAccountNumberSubAccount then everything works fine, but if I use:
where account = `AccountName AccountNumber-SubAccount then it fails
It seems like it is not recognizing the entire string as the account name, but rather just the first piece. Any suggestions on how to fix this problems would be greatly appreciated. Thanks.