I
- Is it possible to use both single and double quotes inside a quoted text string?
Attempting to include examples of both single and double quotation marks inside a quoted string causes problems with early termination of the quoted string, e.g.: title ... - Is there an equivalent for the COALESCE function to find the first non-missing value in a column, rather than a row?
The COALESCE function allows for the first non-missing argument to be returned from a list of variables reading across a row: non_miss = coalesce(arg1,arg2,arg3) the ... - Is it possible to perform a merge where key values are split across two columns?
Normally when performing a horizontal join of datasets, or performing a lookup, the key values exist in a single column, however sometimes 'dirty' data may ... - Is there a facility in PROC SQL to repeat a value down a BY-GROUP in a column, similar to the RETAIN Statement in DATA Step?
Sometimes when data is combined from different sources it is possible to end up with undesirable missing values. Run the following code against the attached ... - Is it possible to generate a shorthand SELECT Clause in PROC SQL with every column 'except' those listed?
No. Although there is the facility to return all columns using the SELECT * syntax, there is no equivalent for the DROP = dataset option ... - Is there an equivalent to the 'begins with' colon modifier to identify variables which 'end with' a particular string?
Efficient programmers (some call us lazy) love the shorthand notation which allows a variable list to be shortened by the colon modifier: data out ; set ... - Is there an easy way to delete macro programme definitions and user-defined macro variables?
There is always a potential for cross-contamination when running code from different programmes in the same session resulting in unexpected ERRORs / WARNINGs, or outcomes ... - Is it possible to create formulae in Excel output and apply formatting from SAS?
The use of the ODS destinations of ODS EXCEL and ODS TAGSETS.EXCELXP have allowed for greater scope to share output, but data is typically static. ... - Is there a way in SAS to read in Excel Long Dates?
SAS is well-equipped with a number of INFORMATs which allow the source data to be read in. There is a particularly useful date informat called ... - I have a list of names with initials some of which have a period but not all - can I add a period after each initial?
Yes! This is one of those data cleansing routines to create consistent data. The process involves SCANning the character string extracting each word in turn, then ... - I constructed an IN list from a dataset, but now it breaks my SQL WHERE clause because it is too long - how do I sort it?
The FAQ Can I create a macro variable longer than 65,534 bytes? is useful for creating a list longer than the 65K character limit imposed by ... - I know that the number of observations is stored in the metadata - how can I retrieve this without processing the dataset?
There are a number of character and numeric metadata attribute values which can be retrieved easily from the dataset's metadata without the requirement to process ...