BookmarkSubscribeRSS Feed
anming
Pyrite | Level 9
data work.retail;
cost = (20000);
total = .10 * cost;
run;

to assign a value to cost, 20000 or (20000) both work. "20000" or '20000' also work but a log note shows that a char is changed to a numeric value.  

1 REPLY 1
Reeza
Super User

Yes, because a value in quotes is considered a character value so SAS converts it to a number before it can do math on the value.

 


@anming wrote:
data work.retail;
cost = (20000);
total = .10 * cost;
run;

to assign a value to cost, 20000 or (20000) both work. "20000" or '20000' also work but a log note shows that a char is changed to a numeric value.  


 

sas-innovate-2024.png

 

Time is running out to save with the early bird rate. Register by Friday, March 1 for just $695 - $100 off the standard rate.

 

Check out the agenda and get ready for a jam-packed event featuring workshops, super demos, breakout sessions, roundtables, inspiring keynotes and incredible networking events. 

 

Register now!

5 Steps to Your First Analytics Project Using SAS

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.

Discussion stats
  • 1 reply
  • 587 views
  • 2 likes
  • 2 in conversation