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.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.