Q:

Invalid symbol/syntax

I am trying to run a PROC SQL step in SAS but keep running into errors for some reason. Here is my code: 
PROC SQL; 
    CREATE TABLE NewTable AS
        SELECT a.ID as ID, 
            a.Group as Group, 
            a.2014_04,
            b.2014_04,
            c.2014_04,
            b.2014_04/a.2014_04,
            c.2014_04/a.2014_04
        FROM work.TESTDATA a
        LEFT OUTER JOIN work.TESTDATA_0000 b on a.ID
        LEFT OUTER JOIN work.TESTDATA_0001 c on b.ID;
QUIT; 

The errors I receive are as follows: 
ERROR 22-322: Syntax error, expecting one of the following: a name, *.  

ERROR 200-322: The symbol is not recognized and will be ignored.

These errors seem to be focused on the variables. Does the error have to do with how I'm referencing the variables? 

A:

In SAS, variable names have to start with a character or an underscore. Your 2014_ columns are therefore invalid in SAS.
Try like this:
PROC SQL; 
    CREATE TABLE NewTable AS
        SELECT a.ID as ID, 
            a.Group as Group, 
            a.'2014_04'n,
            b.'2014_04'n,
            c.'2014_04'n,
            b.'2014_04'n/a.'2014_04'n,
            c.'2014_04'n/a.'2014_04'n
        FROM work.TESTDATA a
        LEFT OUTER JOIN work.TESTDATA_0000 b on a.ID
        LEFT OUTER JOIN work.TESTDATA_0001 c on b.ID;
QUIT;

'<invalid_sas_var_name>'n allows you to still use what would otherwise be an invalid SAS variable name

