07-11-2015 04:11 PM
I am trying to read large number of files. Here i am using this variable topfile to add values everytime a file is read and add it as a column in my final dataset.
%if %sysfunc(exist(mv.movers_signals_all))= 0 %then %do;
/*%local topfile; */
select max(topfile) into :topfile
create table mv.moversdata2_&filen. as
select "&filen" as filedate, "%topfile" as topfile,*
I am trying to read large number of files. Each file has about 50k observations. I want to differentiate between files and Here i am using this variable "topfile" to add values everytime a file is read and add it as a column in my final dataset. But while trying to add values in that macro variable, i am getting this error.
ERROR: Expression using addition (+ ) requires numeric types.
07-11-2015 04:28 PM
Make sure you know when to use & and % in macro expressions. I see two syntax errors. They should be:
select "&filen" as filedate, "&topfile" as topfile,*
07-11-2015 05:18 PM