title: PeopleSoft Power Query convert inside of a Case statement
body: <p>Okay I'm using PeopleSoft's Query Manager trying to write an expression. The original expression converted a date format into DD MON YY, here's the original expression that works:</p>
  <p><code>CONVERT(VARCHAR(10), A.TERMINATION_DT, 103) AS [DD MON YY]</code></p>
  <p>I need to add termination dates for a few people, manually (they're not termed yet, but will be, so I have to input it like this).</p>
  <p>So I thought I could do a case statement:</p>
  <p><code>(CASE WHEN B.EMPLID IN ('XXXXXX') THEN '2022-08-19' ELSE (CONVERT(VARCHAR(10), A.TERMINATION_DT, 103) AS [DD MON YY]) END)</code></p>
  <p>When I input the above I get the following error:</p>
  <blockquote>
  <p>A SQL error occurred. Please consult your system log for details.
  Error in running query because of SQL Error, Code=8603,
  Message=[Microsoft][ODBC Driver 13 for SQL Server][SQL
  Server]Incorrect syntax near the keyword 'AS'. [Microsoft][ODBC Driver
  13 for SQL Server][SQL Server]Incorrect syntax near 'PS_JOB'.
  [Microsoft][ODBC Driver 13 for SQL Server][SQL Server]Incorrect syntax
  nea란ᆌŪ (50,380)</p>
  </blockquote>
  <p>Where am I going wrong?</p>