Hi, I used commax format to format some numeric variables. Nevertheless, running the code I got an error: "character expression requires character format"
proc sql;
create table
table
as select
variable1,
variable2 format commax22.2
from source;
quit;
I'm sure variable 2 is numeric, why do I get the error? thanks anyone for help
@ari2495 wrote:
Yes, i've just run, and i found out the format is "best". Can you suggest me what to do? thanks and excuse me, i'm a new user
Note the question is not what format is ATTACHED to the variable. The question is what TYPE is the variable.
Why are you "sure"? Did you run PROC CONTENTS?
@ari2495 wrote:
Yes, i've just run, and i found out the format is "best". Can you suggest me what to do? thanks and excuse me, i'm a new user
Note the question is not what format is ATTACHED to the variable. The question is what TYPE is the variable.
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
For SAS newbies, this video is a great way to get started. James Harroun walks through the process using SAS Studio for SAS OnDemand for Academics, but the same steps apply to any analytics project.
Find more tutorials on the SAS Users YouTube channel.