0

So, I've listed below the code that I was inputting and the error that I was receiving. I've done this below on the normal SAS on the computers at school, but now I'm using a laptop and using SAS University Edition. I ran my data through PROC GLMSELECT, for the fact that it partitions into TEST, TRAIN, VALIDATE. Now I'm trying to take out every row that has TRAIN in the ROLE column and make a new data out of it, same for TEST and VALIDATE also.

 1          OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 55         
 56         Proc SQL;
 57         Create table Train122004 as
 58         Select *
 59         From PF122004
 60         Where _Role_ = Train
 61         ;
 ERROR: The following columns were not found in the contributin tables: Train.
 NOTE: PROC SQL set option NOEXEC and will continue to check the syntax of statements.
 62         
 63         OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 75     

I can give whatever more anyone needs to help with this. I can give a sample of what the data looks like, the reason why I'm doing this, anything.

Mureinik
  • 297,002
  • 52
  • 306
  • 350
Fmonkey2001
  • 147
  • 7

1 Answers1

3

Train is a value in the column, not a column name. Therefore, it should be surrounded by quotes ('):

 57         Create table Train122004 as
 58         Select *
 59         From PF122004
 60         Where _Role_ = 'Train'
 61         ;
Mureinik
  • 297,002
  • 52
  • 306
  • 350
  • 1
    Geez, I see the mistake now! When I moved from my previous SAS file I just replaced the whole thing and forgot to add the quotes back! Thank you so much! – Fmonkey2001 May 21 '16 at 08:10