title: Reverse Crosstab Query in Access
body: <p>In Access 2013, my table has the following structure:</p>
  
  <pre><code>Name   |City   |Q113   |Q213
  Peter  |London |20     |30
  Sandra |Paris  |40     |50
  </code></pre>
  
  <p>I want to "reverse a crosstab query", getting the following:</p>
  
  <pre><code>Name   |City   |Period   |Value
  Peter  |London |Q113     |20
  Peter  |London |Q213     |30
  Sandra |Paris  |Q113     |40
  Sandra |Paris  |Q213     |50
  </code></pre>
  
  <p>I tried a Union query, using SQL:</p>
  
  <pre><code>SELECT [Name], [City] ,'Q113' AS [Period], [Q113] AS [Value]
  FROM [Database]
  UNION ALL
  ORDER BY [Name]
         , [City]
         , [Period]
  </code></pre>
  
  <p>However, it isn't working, I keep getting the error: "Invalid SQL statement expected; 'DELETE','INSERT', 'PROCEDURE', 'SELECT' or 'UPDATE'</p>
  
  <p>Googling this error didn't help much, so I guess there is something wrong with the code above? Please help.</p>