title: Referencing a macro variable created by a prompt SAS EG
body: <p>I created a prompt in SAS EG that takes a text input and creates the macro variable called 'variableName'. </p>
  
  <p>I am trying to reference this macro variable like so:</p>
  
  <pre><code>proc sql;
  create table MyTable as
     select * from Source_Table as a
     where a.field = &amp;variableName ;
  </code></pre>
  
  <p>This gives me an error that says: "Syntax error, expecting one of the following: a name, a quoted string, a numeric constant, a datetime constant, a missing value, BTRIM, INPUT, PUT, SUBSTRING, USER."</p>
  
  <p>I have also tried enclosing &amp;variableName in single and double quotes but when I do that I just don't get any results.</p>
  
  <p>I am able to reference the prompt when I use query builder and filter data based on the prompt, but I am trying to use the prompt's value in calculated expressions, etc. and in queries I write without query builder. How can i reference the variable I created in the prompt??</p>
  
  <p>Edit: code with a value that the macro variable would have</p>
  
  <pre><code>proc sql;
  create table MyTable as
      select * from Source_Table as a
      where a.field = 'NAME OF PERSON';
  </code></pre>
  
  <p>When I run that, I get the results I want.</p>