If you want to use PROC SQL, you don't use =.
proc sql;
create table aaa as
select variable1,
compress(variable2,':') as variable2
FROM aaa2
;
quit;
Question
I have a variable and more of them has a colon (:) in the sentence. Like AC: acuimule, AB: abitre,..
I need to remove colons from all rows in that variable. I tried
proc sql;
create table aaa as
select variable1,
variable2=compress(variable2,":")
FROM aaa2
;QUIT;
Solution
If you want to use PROC SQL, you don't use =.
proc sql;
create table aaa as
select variable1,
compress(variable2,':') as variable2
FROM aaa2
;
quit;