Solved

Naming a variable with embedded blanks in SAS

Posted on 2014-10-21
2
238 Views
Last Modified: 2016-02-13
Experts,

I have a variable that I would like to  rename to output to Excel with embedded blanks.  Is there a way to do this?

ie    "Prov_Num "   to  "Provider Number"
0
Comment
Question by:morinia
  • 2
2 Comments
 
LVL 8

Accepted Solution

by:
ShannonEE earned 500 total points
ID: 40395767
Variables with embedded blanks and other weird characters are allowed in sas by using the N suffix after the variable name in quotes.

For example to rename   Prov_Num   to  "Provider Number"  in SAS dataset  temp.results  you could run a job similar to this

data results(rename=(Prov_Num = 'Provider Number'n Cust_Num='Customer Number'n));
    set results;
run;

Open in new window


However when you create the variable in your previous work, you could have done exactly what you previously did, except everywhere you defined and used Prov_Num you now specify 'Provider Number'n

Ian
0
 
LVL 8

Expert Comment

by:ShannonEE
ID: 40395771
Hi there morinia,

In addition to the above, I must caution you strongly that ms excel is an excellent piece of software to help you make mistakes.  This warning is over and above the warning that excel has a host of errors, some documented by ms and others ignored by ms.

Ian
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

SQL Command Tool comes with APEX under SQL Workshop. It helps us to make changes on the database directly using a graphical user interface. This helps us writing any SQL/ PLSQL queries and execute it on the database and we can create any database ob…
Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question