About 102,000 results
Open links in new tab
  1. How to Use the SUBSTR Function in SAS (With Examples)

    Jan 13, 2022 · You can use the SUBSTR function in SAS to extract a portion of a string. This function uses the following basic syntax: SUBSTR(Source, Position, N) where: Source: The …

  2. PROC SQL: SUBSTRING function - SAS Support

    SUBSTRING returns a specified part of the input character string, beginning at the position that is specified by start. If length is omitted, then the SUBSTRING function returns all characters …

  3. Using SUBSTR and CHARINDEX into PROC SQL (SAS)

    Jul 17, 2015 · But the correct syntax should be: substr (answer, index (answer, '-') + 1); /* tested on data step and proc sql. when the 3rd argument is omitted, the remainder of the string is …

  4. SUBSTRING Function - SAS Help Center

    Mar 21, 2025 · SUBSTRING returns a specified part of the input character string, beginning at the position that is specified by start. If length is omitted, then the SUBSTRING function returns all …

  5. proc sql - Extract left part of the string in SAS? - Stack Overflow

    Oct 14, 2014 · substr ("some text",1,4) will give you "some". This function works the same way in a lot of SQL implementations. Also, note that this is a string function, but in your example …

  6. Easiest way to extract specific number - Scan or substring in proc SQL ...

    May 26, 2021 · I'm using a combination of the FIND, LENGTH, and SUBSTR functions. I'm sure there are other ways to do it as well. Regards, Jim. Results: Code: Search_For = '27.59'; . …

  7. SAS: How to Extract Substring from Right - Statology

    May 9, 2023 · You can use the SUBSTR function in SAS to extract a portion of a string. This function uses the following basic syntax: SUBSTR(Source, Position, N) where: Source: The …

  8. SAS: How to extract last N characters / digits - ListenData

    The SUBSTR() function returns sub-string from a character variable. = SUBSTR(character-variable, beginning-position, number-of-characters-to-pull) The LENGTH() function returns the …

  9. 2 questions: How to use substr in PROC SQL and how to ... - SAS

    Sep 20, 2023 · set substr(YR, 1, 4) = '2023'; For some reason, I keep getting an error of Expecting =. Question 1: What's the proper way to use the substr function in PROC SQL? …

  10. SUBSTRING Function - SAS Help Center

    Jan 27, 2025 · SUBSTRING is the FedSQL implementation of ANSI SQL substring extraction behavior. Use SUBSTR if you prefer to emulate the syntax extraction behavior of the DATA step.

  11. Some results have been removed
Refresh