Thank you.
That kind of makes sense ... ... ... except that ... ... ... it was the quotes around SecurityAssistID that I changed.
I didn't touch the others at all.
So I shall just assume that when there are 'function words' or 'reserved terms' of any kind in a query, then it makes a difference to all quotes used in that query. And I shall systematically examine and if necessary change them all.
It would of course be far better to avoid those function words, which I guess means becoming more invinventive in my choice of names.
Thank you again.