proc sql; create table curr_util as select org, acc, "curr_util" as sum_type, sum(BAL,PBI_BAL)/LIMIT as sum_value, from pbi;
what does this quotation mark doing here? why is it required?
For SAS to understand that the programmer means you have a text string, the text string must be in quotes. Otherwise, if you write curr_util without the quotes, SAS thinks that curr_util is the name of a variable.
Quotation marks have the same meaning throughout all applications of the SAS software.
No quotation marks refers to a variable's value. It would mean the value of the variable CURR_UTIL should be the value assigned to the new variable SUM_TYPE.
Quotation marks refers to a set of characters. It would mean the nine characters "curr_util" should be assigned to the new variable SUM_TYPE (same value for every observation).
For many "why" questions I ask the original programmer if possible. Or read any comments.
The result is adding the same literal text to all of the records in a new variable.
When I see a variable containing the value of a data set name like this I suspect that somewhere else this result is combined with some other data and this variable indicates which data set contributed the record.
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.