The database my application uses has field names containing spaces. I believe this to be the cause of my problem. Here is a typical query:
SELECT * FROM \'OV2
Replace ' with
'
"
`
[
]
For example: "OV2 BAS", bas."Ref ID" = ids."Ref ID", etc.
"OV2 BAS"
bas."Ref ID" = ids."Ref ID"