I am building an SQL string to be executed. It contains the supplier name enclosed in single quote, as the supplier name is often multiple words.
When I use Print to display my SQL, it shows the single quotes around the supplier name, but when I execute it I receive an error message containing the SQL string where the single quotes have disappeared.
The two dialogs in the following image show the problem:
The following dialog shows the result when I use two single quotes, which I tried on the principle that one pair might be stripped, leaving the remaining pair to do their work. Note that neither of the single quotes has been removed:
What am I doing wrong?