You can certainly do this in a SAS SQL passthru query. You can run normal SAS code including SAS SQL in SAS VA using SAS Studio which comes bundled in a VA (7.x) installation. You would however need SAS/ACCESS to SQL Server or ODBC installed on your VA platform.
The 2025 SAS Hackathon has begun!
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.