title: SAS variable as SQL table name
body: <p>EDIT: Thank you for the quick responses. I have a lot to learn about SaS obviously but everyone's responses were very helpful.</p>
  
  <p>Beginner here, trying to write SAS code that can be easily ported across systems.</p>
  
  <p>Goal:
  I want to have PROC SQL use a global variable for a multipart table identifier.</p>
  
  <pre><code>/* global variables*/
  %LET lib_name="Merge_Contacts"
  %LET table_name="Contacts"
  
  
  /* Simple Query */
  PROC SQL;
      CREATE TABLE Merged_Contacts AS
          SELECT a.*, b.*
          /* Below is the problem area */
          /* SAS doesn't recognize this as a valid lib/table name */
          FROM &amp;lib_name.&amp;table_name 
          ... 
          /*merge another table*/
  QUIT;            
  </code></pre>
  
  <p>I've tried to concatenate this identifier in several ways to no success. Any thoughts? Thanks!</p>