Hello all,
I see a few topics here on escape character but am not sure they work for proc sql or maybe I am doing somting wrong...
example string:
Y:\mydir\mysubdir\myfile.txt
Y:\mydir2\mysubdir\myfi%le.txt
proc sql;
create table list_of_maybe_bad as
select
Path_File,
length(Path_File) as lh_Path_File,
trimn(Path_File) as Path_File1,
/*...*/
from list_of_working
where upcase(Path_File) not like "D:\SOFTWARE\%" /* Do not search our Software repostitory */
and Path_File like '%\%%'
;
quit;
In my case i need to return just the second file. I have tryied '%%%' '%\%%' '%/%%' TIA.
According to the documentation, you can choose your own escape character (i.e. ideally a character which does definitely not occur in the strings you work with): If '^' was such a character, the WHERE condition
Path_File like '%^%%' escape '^'
would match any string which contains a percent sign.
According to the documentation, you can choose your own escape character (i.e. ideally a character which does definitely not occur in the strings you work with): If '^' was such a character, the WHERE condition
Path_File like '%^%%' escape '^'
would match any string which contains a percent sign.
I see I should have been looking up like... Thank you.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.