sas Resolving Macro Variables in quotes within PROC SQL Pass-throughs

30% OFF - 9th Anniversary discount on Entity Framework Extensions until December 15 with code: ZZZANNIVERSARY9


One of the challenges I faced when I first started using SAS was not only passing Macro Variable data into a PROC SQL pass-through, but having it resolve properly if it needed quotes around it. When passing a string like value or date/datetime into a PROC SQL pass-through, it most likely needs to have single quotes around it when it resolves.

I have found the best results when using the %BQUOTE function to accomplish this.


More information on the %BQUOTE function can be found here:

Got any sas Question?