When I tried to optimize a code with a date in single quotes, SQL Optimizer always reformats the date with spaces in between after generating alternatives and the alternatives will not execute.
For example, `01-JAN-2009` becomes `01 - JAN - 2009.` See screens shot SOL67057_fig01.JPG.
Not a SQL Optimizer issue. Wrong single quote character.
The single quote around the date is not a single quote but it is the symbol below the tilde character in the keyboard (see screen shot SOL67057_fig02.JPG). Try deleting those existing single quotes and re-typing it.